A Kiwanis Club database...
When a database opens, the first form to come up is frmSplash.
Behind that form lies the following code:
Note the line in bold print: If Day(Date) <= 7 Then
The message occurs if the date upon which the database is opened is in the first 7 days of the month.
The user wants to change this so that the message occurs anytime between the second last Thursday and the last Thursday of the month.
Can you advise appropriate code to select that date range?
Thanks.
Tom
When a database opens, the first form to come up is frmSplash.
Behind that form lies the following code:
Code:
Private Sub Form_Timer()
On Error GoTo Form_Timer_Error
DoCmd.Hourglass True
Me.TimerInterval = Me.TimerInterval - 50
If Me.TimerInterval = 0 Then
DoCmd.Hourglass False
DoCmd.Close
[b]If Day(Date) <= 7 Then[/b]
Select Case MsgBox(" REMINDER..." _
& vbCrLf & "A Celebrations Report needs to be printed once a month." _
& vbCrLf & " " _
& vbCrLf & " Do you want to print that report now?" _
& vbCrLf & "" _
& vbCrLf & "(this reminder appears up to the 7th of each month)" _
, vbYesNo Or vbExclamation Or vbDefaultButton1, "Celebrations Report check")
Case vbYes
DoCmd.OpenForm "frmMonthSelector"
Exit Sub
Case vbNo
DoCmd.OpenForm "frmMainMenu"
End Select
End If
DoCmd.OpenForm "frmMainMenu"
End If
On Error GoTo 0
Exit Sub
Form_Timer_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Form_Timer of VBA Document Form_frmSplash"
End Sub
Note the line in bold print: If Day(Date) <= 7 Then
The message occurs if the date upon which the database is opened is in the first 7 days of the month.
The user wants to change this so that the message occurs anytime between the second last Thursday and the last Thursday of the month.
Can you advise appropriate code to select that date range?
Thanks.
Tom