Function as Criteria??

XaloRichie

Registered User.
Local time
Today, 12:55
Joined
Jul 2, 2003
Messages
70
I Have a query based on a Customer table , I wish to pass a value to the criteria from code, well a function is it possible?
eg function returns customerID and want the query to display for just that ID.
The reason I did it like that is so the selected ID can be validated before opening the query. No good asking for a CustomerID higher than the last one created.

Any suggestions Please.
 
I would use a combo box to display the CustomerName or ID, whichever you prefer, and then use the combo box as the criteria for the query with code similar to this:

[Forms]![FormName]![ComboBoxName]

If the combo box is bound to CustomerID then you will be good to go and the user cannot select a number that does not exist.

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom