Macro conditions to open a query

R

Ryan

Hi
I need to write a Macro that only opens a query if today's date is not
already in a particular table.

My table name is "APDOverdues"
The field that the macro condition is based on is "Today"
My query name is "Overdues"

I have started a macro that opens the "Overdues" query based on the
following condition:

[Today]![APDOverdues]<>Date( )

Access says that it cannot find the [Today] field. Can anyone please help?
Thanks
 
S

Steve Schapel

Ryan,

Try your Condition like this:

DCount("*","APDOverdues","[Today]=Date()")=0
 
R

Ryan

Thanks Steve. Perfect!

Steve Schapel said:
Ryan,

Try your Condition like this:

DCount("*","APDOverdues","[Today]=Date()")=0

--
Steve Schapel, Microsoft Access MVP
Hi
I need to write a Macro that only opens a query if today's date is not
already in a particular table.

My table name is "APDOverdues"
The field that the macro condition is based on is "Today"
My query name is "Overdues"

I have started a macro that opens the "Overdues" query based on the
following condition:

[Today]![APDOverdues]<>Date( )

Access says that it cannot find the [Today] field. Can anyone please help?
Thanks
 

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

Top