Date Greater Than 30 Days in Macro or Code

  • Thread starter Thread starter Gulf Coast Electric
  • Start date Start date
G

Gulf Coast Electric

I need this criteria to show only records that are past the Days Past Due
Date.
I tried this in a macro, but it didnt work.

[Days Past Due]>=30
 
Gulf Coast Electric said:
I need this criteria to show only records that are past the Days Past Due
Date.
I tried this in a macro, but it didnt work.

[Days Past Due]>=30


Use DateDiff(...) function see Help about it.

Bye.
Alessandro(IT)
 
I need this criteria to show only records that are past the Days Past Due
Date.
I tried this in a macro, but it didnt work.

[Days Past Due]>=30

Could you give us a little help here?

What's the structure of your table? What field are you trying to
search? Where is [Days Past Due] defined, and what is its datatype?
 
Sorry, the table name is Orders and the query name is Outstanding Invoices
with three tables in it.
The form name is FPayments Below is criteria used for obtaining date
difference in query for Invoice date and the amount of days since.
Days Past Due: DateDiff("d",Now(),[Order Date])
I just want to show the records that are 30 days since their Order Date,
that is their original Invoiced
Date.Order Date control in table Orders is Date/Time with short date format.

--
-------------------------------------------------------------------------
Thanks for your Help.
John Vinson said:
I need this criteria to show only records that are past the Days Past Due
Date.
I tried this in a macro, but it didnt work.

[Days Past Due]>=30

Could you give us a little help here?

What's the structure of your table? What field are you trying to
search? Where is [Days Past Due] defined, and what is its datatype?
 
Sorry, the table name is Orders and the query name is Outstanding Invoices
with three tables in it.
The form name is FPayments Below is criteria used for obtaining date
difference in query for Invoice date and the amount of days since.
Days Past Due: DateDiff("d",Now(),[Order Date])
I just want to show the records that are 30 days since their Order Date,
that is their original Invoiced
Date.Order Date control in table Orders is Date/Time with short date format.

I'd suggest simply putting a criterion on Order Date of

< DateAdd("d", -30, Date())

You can still use the Days Past Due field if you wish - it will be
equal to -30 if the Order Date is 30 days ago; if you want a positive
number reverse the Now() (actually Date() is better) and [Order Date]
arguments.
 
Back
Top