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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validate from Dlookup

Status
Not open for further replies.

lisaharris

Programmer
Feb 12, 2007
130
US
I have an application where users enter information into a form. There is an existing dlookup that returns the customer name based on the customer number entered. The customer name is not stored in the table, only the customer number. This is the functioning dlookup: =DLookUp("[CustName]","CUSTOMERS","[Custno]=[ID]")

How can I validate that the customer number is correct and disallow the user from continuing if the customer number does not exist in the CUSTOMERS table? I tried putting a validation rule on the field that shows the dlookup but it caused a SQL connection error.

Any ideas greatly appreciated.


__________
Veni, Vidi, Visa: I came, I saw, I charged it.
 
Why not simply use a ComboBox for your ID control.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top