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

If function (I Think! but maybe recordset??) 1

Status
Not open for further replies.

Walshie1987

Technical User
Oct 5, 2006
100
Hi, just wondered how I would put the following into code:

(I know how do to the Dlookup part)

If the value I enter in a textbox is not found during a dlookup then leave the value as it is, if it is found in the dlookup then enter the dlookup value.

e.g
If I put "Test" into a text box and dlookup cannot find "Test" my table, then just leave the word "Test" in the text box.

If the word "Test" was found in my table then put the info from my table into the text box instead of the word "Test"

Thanks alot
Chris
 
A starting point:
Me![textbox] = Nz(DLookUp(you know how do to the Dlookup part), Me![textbox])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top