dlookup in texbox in report

  • Thread starter Thread starter tonyrulesyall
  • Start date Start date
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.
 
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
 
Back
Top