Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SelText Function on a ComboBox
Message
From
22/03/2000 11:07:01
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
SelText Function on a ComboBox
Miscellaneous
Thread ID:
00348927
Message ID:
00348927
Views:
36
Hi,

I have a problem with the SelText function. I want to read the value chosen by the user once that user hits the "OK" button incorporated on a form. The problem is that even if the user chooses a valid value from the ComboBox object (called day_box here), SelText returns the empty String. Here is a parcel of my code if it helps:

Private Sub btnOk_Click()
Dim DateSend As String
If (day_box.SelText <> "") Then
DateSend = Principal.myFormat(CreateDate)
Principal.currentForm.Visible = False
'More code here
Else
MsgBox ("Please choose a day!")
End If
End Sub

I always get the "Please choose a day" message!

Is it something I'm doing wrong or is it only because I'm not using the correct function for what I want to do? Is there any other way to read the option chosen by a user from a ComboBox?

I know that it must be something really stupid but I can't seem to find what.

Thanks in advance, Steph.
Next
Reply
Map
View

Click here to load this message in the networking platform