Passing parameters to the query

M

Madhup Thakur

WinXP A2003
I have a form "frmCity" based on a query "qryCity". What I wish to achieve
is that if a Combo text search does not have not have any record in the
query it opens a new query "qryNILFL" and lists all the records based on the
search criterion.

The code that I am using is:

Private Sub Combo18_NotInList(NewData As String, Response As Integer)
DoCmd.OpenQuery "qryNILFL"
Me.Combo18 = ""
End Sub

The "qryNILFL" has the criteria [Forms]![frmCity]![Combo18]

I also wish to do away with MSG Box which states as follows
"The text you entered is not an item on the list
Please select an item on the list, or enter text that matches an item on the
list"

How do I achieve this? TIA
Madhup Thakur
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top