dlookup in texbox in report

T

tonyrulesyall

I created a textbox in an Access XP report.

I would like the textbox to use a dlookup formula to pull a date of
birth from a table.

This is the formula I am using:
=DLookUp([dob],"tblMain",[fileno]="1234")

When it runs, I am getting this:
#Name?

I know that fileno (file number) 1234 is a real file number.
 
A

Allen Browne

The quotes are not right in the 3rd argument.

Try:
=DLookup("dob", "tlbMain", "fileno=1234")

If fileno was actually a Text field, you would need extra quotes:
=DLookup("dob", "tlbMain", "fileno='1234'")

More DLookup() examples:
http://allenbrowne.com/casu-07.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

dlookup with textbox on report 2
Dlookup in Detail 7
needing dlookup assistance 2
DLookup in a grouped footer 4
DLookup in Query 1
DLookup different values 1
Dlookup HELP 2
Problem with report using DLookup 4

Top