check value against table?

mohsinhq

Registered User.
Local time
Today, 23:24
Joined
Aug 2, 2004
Messages
90
is it possible to check a value entered in a text box to see if it exists in a specific table?

all help appreciated..
 
ive had a look in help and it says that dlookup returns a value to the form..

i just want it to check the value in my textbox (ShipNo) against the value in the query (BDPE_LOV_Data) and the field (ROUTE_ID)

i tried putting this into the control of the text box :

=DLookUp("[ROUTE_ID]","BDPE_LOV_Data")

without any luck. it wont let me enter a value in the text box

??
 
a. Sounds like the control source should be set back to ShipNo?

b. In the before update event for the ShipNo text box, would something like the following work:

if not isnull(dllookup("[rout_id]","BDPE_LOV_Data", "[rout_id] = " & me!shipNo)
do some stuff
else
msgbog "Ship no / route id problem"
docmd.cancelevent
end if



???
kh
 

Users who are viewing this thread

Back
Top Bottom