DLookup question....

E

Edo2008

The following statement gives me a Runtime Error 94: Invalid use of
Null:

dim intVisitID as integer

intVisitID= DLookup("VisitID", "Visits", "[VisitDate] =
3/8/2008")

I'm trying to see if any table entries is Table "Visits" have a
"VisitDate" entry (which has a Date/Time format) equal to today. As a
test case, I hardcoded today's date... my next step was to use the
"Date()" function. Note that all 5 entries in teh Visits table have
date/time values.

Can anyone help?

Thanks
-Ed
 
T

Tom Lake

Edo2008 said:
The following statement gives me a Runtime Error 94: Invalid use of
Null:

dim intVisitID as integer

intVisitID= DLookup("VisitID", "Visits", "[VisitDate] =
3/8/2008")

I'm trying to see if any table entries is Table "Visits" have a
"VisitDate" entry (which has a Date/Time format) equal to today. As a
test case, I hardcoded today's date... my next step was to use the
"Date()" function. Note that all 5 entries in teh Visits table have
date/time values.

Can anyone help?

Have you tried this?

intVisitID= DLookup("VisitID", "Visits", "[VisitDate] >= # 3/8/2008#")

Tom Lake
 
E

Edo2008

THANK YOU !!! It worked like a charm !

I LOVE GOOGLE GOUPS !!!

Thank you so much for taking the time to answer. It is unbelievable
the amount of help newgroups provide and I do not take it for
granted !!

-Ed
 

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


Top