Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combo box problem

Status
Not open for further replies.

gasx

Technical User
Feb 28, 2003
22
US
why this code work on text box and is not working with combo box. I have form with text box when I insert this code is work.

If Me.text1 <= orderDate Then
MsgBox &quot;my message ,&quot; & vbCrLf &quot;&quot;vbExclamation,
&quot;title&quot;

but when I insert same code on combo box is not working.

If Me.combo1 <= orderDate Then
MsgBox &quot;my message ,&quot; & vbCrLf &quot;&quot;vbExclamation,
&quot;title&quot;

what I did wrong. please help.
 
Where are you putting the code in the combobox? After Updat event procedure. That makes the most sense.

Also, check to see if the bound column is set to the column of the date from the row source in the combobox. If it is set to a different column that the one that has the date info it will not execute properly.

Bob Scriver
 
Also, you may have to perform a DateValue or CDate function on the Combobox data to convert a string entry to a datevalue.

If DateValue(Me.combo1) <= orderDate Then
MsgBox &quot;my message ,&quot; & vbCrLf &quot;&quot;vbExclamation,
&quot;title&quot;

Just a couple of suggestion to my original post.


Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top