Capture Prev Year w/Month(Now()) (1 Viewer)

brucesilvers

Registered User.
Local time
Today, 11:31
Joined
Aug 4, 2000
Messages
70
> In an organization's Membership Database, I am having a problem with the queries that generate invoices.

> The invoice type is generated by the following query field:

InvoiceType: IIf([Members]![RenewalMonth]=Month(Now())+2,"FIRST NOTICE",IIf([Members]![RenewalMonth]=Month(Now())+1,"SECOND NOTICE",IIf([Members]![RenewalMonth]=Month(Now()),"FINAL NOTICE","OVERDUE")))

> The criteria are as follows:

[RenewalMonth] = Month(Now())+3 Or Month(Now())+2 Or Month(Now())+1 Or Month(Now()) Or Month(Now())-1 Or Month(Now())-2 Or Month(Now())-3 Or Month(Now())-4

Year([NextDues]) <Year(Now())+1

> This seems to be working for most of the year. However, if the current month is March or earlier, the months from the previous year are eliminated (i.e., prev Dec, Nov, Oct, etc.)

> Any suggestions on how to get around this? I'd really like to do this in either the query grid or the SQL rather than VBA if possible. Thanks for your help!!!
 

Users who are viewing this thread

Top Bottom