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

is a value in my table

Status
Not open for further replies.

blindlemonray

Technical User
Nov 24, 2003
130
GB
Hi,

I have some code that enters a set of values into a table, but what I want to do is check to is the value is already in the table so I can avoid it being entered twice.

I thought dlookup might work but it does not seem to do what I need. I don't know whether I am getting the code wrong or dlookup is not what I need. Any suggestions appreciated.

Code:
DLookup("[value_code]", "master_client_plan", Me.form_Code)

 
Perhaps something like this:
Code:
DLookup("value_code", "master_client_plan", "value_code='" & Me!form_Code & "'")
If value_code is defined as numeric in master_client_plan then get rid of the single quotes.

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

Part and Inventory Search

Sponsor

Back
Top