General information
Category:
Forms & Form designer
Title:
SelText Function on a ComboBox
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only