1st of the month

teiben

Registered User.
Local time
Today, 15:56
Joined
Jun 20, 2002
Messages
462
I have a form that opens regularly, I need it to open a popup form when the date is equal to the first of the month, I was thinking of comparing the system date to the first of the month date, not sure how to do this? any idea?
 
In the Form_Load event of the first form:
Code:
Private Sub Form_Load()
If Date = DateSerial(Year(Date), Month(Date), 1) Then
  DoCmd.OpenForm "PopUpFormName"
End If
End Sub
 
What happens if the first of the month is on a weekend? You may want to consider looking for the first monday in the month as well. Also you may need to hold a flag to denote that the form has been opened this month. Is this going to be a once only operation?

David
 
KISS...

Day(Date()) = 1

The intresting question of David stands though... what about weekends/holidays?
 

Users who are viewing this thread

Back
Top Bottom