Macro conditions to open a query

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