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

multiple field primary key searches

Status
Not open for further replies.

cochise

Technical User
Mar 27, 2001
171
US
Any help on what the code would be behind a cmd button on a form whose purpose is to search for a record in a table with a primary key consisting of the following three fields:

EmpNum, Date, InvNum

It needs to search on all 3 fields.

Thanks for the help.

 
IF I understand what you are trying to do something like below should work

select * from table where key = EmpNum & Date & InvNum
or
select * from table where EmpNum & Date & InvNum = key


 
Actually the form is based on a query. Are you saying I have to change the record source in my code?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top