Date problem in query

  • Thread starter Thread starter Teresa
  • Start date Start date
T

Teresa

I am trying to add current charges to a charges table
(which has many charges from each month per customer)
from a customer table so I can run invoices. Each
customer has a different billing date in the month,
depending on when they signed up. How do I tell the
query to add one charges record with the due date one
month from the latest billing due date?
 
I am trying to add current charges to a charges table
(which has many charges from each month per customer)
from a customer table so I can run invoices. Each
customer has a different billing date in the month,
depending on when they signed up. How do I tell the
query to add one charges record with the due date one
month from the latest billing due date?

Set the Default property of the due date field (if it's stored in the
table) to

DateAdd("m", 1, NZ(DMax("[BillingDate]", "[tablename]", "[CustomerID]
= " & [CustomerID]), Date())

This will set the due date one month after the largest existing
billing date for this customer, or a month from today if this customer
has no billing date listed yet.
 
Back
Top