Dlookup Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

New to Dlookup function, please help:

I am looking up a value from a query where the criteria is a particular
date. ie. =Dlookup(<expr>,<domain>,Date = 28/02/2002).

How do I get this to work without having to type in the number for the date
being looked up (37315 in this case)?

Many thanks
 
How do I get this to work without having to type in the number for the
date
being looked up (37315 in this case)?

don't know what you mean by that, but...
in your example "Date" must be the name of a field in your domain (though if
you have a table with a field named Date, you should change it. Date is a
Reserved Word in Access, and reserved words should never be used as a name
for anything in the database). if the Date field is data type Date/Time, to
find a date value you would write the criteria expression as

=Dlookup(<expr>,<domain>,"Date = #28/02/2002#")

hth
 
Enter the date in a text box on your form.
DLookup("[field]","table", "[field] ='" & Me!txtdate & "'")
 
Thanks for the solution and advice

tina said:
don't know what you mean by that, but...
in your example "Date" must be the name of a field in your domain (though if
you have a table with a field named Date, you should change it. Date is a
Reserved Word in Access, and reserved words should never be used as a name
for anything in the database). if the Date field is data type Date/Time, to
find a date value you would write the criteria expression as

=Dlookup(<expr>,<domain>,"Date = #28/02/2002#")

hth
 

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


Back
Top