Hello everyone,



Im almost done with my event database, but there is only an issue..
I set up some filters at starup of the database so that the user can be able to save time when searching for specific criteria.

Fox example: provided a list box with client's name and when i click on the button i can get to open the form with with only the selected client's name.. and the same is for others..

inside the client form, i did an event subform.. I wanted as well to create a filter for criterias within the event subform

For example, i would like to look up for ReferenceNo (each event has a reference number) and get the client form opened. this is the code that i used in the OnClick Event having a list box with the name of Combo0:

The OnClick event was set up in the button beside the list box:

Private Sub Command2_Click()
If IsNull(Combo0) = True Then
MsgBox "You must select a keyword."
Else
DoCmd.OpenForm "Client", , , "RefNo like '*" & Combo0 & "*'"
End If

End Sub

_________________________

Everything works great but the only issue is that I get a pop-up field to enter the RefNo again! So when i enter it correctly i can view the correct ClientForm, but if either i cancel it or enter another one, i dont get to see any form!
How can this be done in a correct way just to avoid the entering of parameter?

Please people, any help will be more than appreciated!

Thanks in advance!@