By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,500 Members | 1,571 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,500 IT Pros & Developers. It's quick & easy.

DLookup syntax when there are two primary keys

P: n/a
Hi,

I have a table with two primary keys as below.

Table: Mouse
Primary key 1: MouseLine
Primary key 2: MouseNumber
Field 3: DateOfBirth

In a particular form, if I know MouseLine and MouseNumber, can I use
DLookup() to get DateOfBirth value? I know the syntax for DLookup()
when there is only one primary key in a table, but not when there are
two. Please help.

Thanks,
Tony

Dec 1 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Yes you can, something like:

dlookup("[DateofBirth]","table","Mouseline = " & chr(34) & Variable &
chr(34) & " and MouseNumber = " & Number)

You'll have to work out the quotes and stuff.

Dec 1 '05 #2

P: n/a
Got it. Thanks Dean.

Dec 1 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.