View Full Version : search


erza
03-18-2002, 07:43 PM
hi..how to use command button (CmdSearch) to search Date?i got 2 combo boxes for searching date(CboDateFrom) and (CboDateTo) so after the users choose the Datefrom and DateTo from the Combo box, then when they click the Command Button (CmdSearch) and all the events happened on that date will display on the subform fields.
How have try it already but stuck..
so anyone can help?

reply back if my question or problem make u all confuse...
Thank Q

celosia
03-18-2002, 10:07 PM
and i use this code:
Private Sub CmdSearch_Click()

If cbofrom.ListIndex = "" Or cboTo.ListIndex = "" Then
MsgBox "Plese select a valid date in it", vbCritical, "Order"
Else
If IsDate(cbofrom.ListCount) Then
MsgBox "Please enter a Valid date in it", vbCritical, "Order"
Exit Sub
Else
MsgBox "Could Not Found Order Between" & "" & TxtTo.Text, vbCritical, "Order"

End If
End If


End Sub