Date timed message box

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Hi,

Is it possible to create a msg box that will show on a
specific date ie the first of each month,to remind the
user to do a specific task. In this case its the monthly
stats.

cheers Steve
 
yes. decide what event you want to trigger the message
box, such as when a particular form opens (perhaps
the "switchboard", or whatever form opens automatically
when the db is opened). then, instead of just setting the
event to open the messagebox, try this:

If Day(Date)= 1 Then
MsgBox "Run monthly stats"
EndIf

hth
 
You can do it. However, Access must be running on the date you want the
label to show. Set the visible property of the label to No. Add some code
to the form Load event:
Dim datTodaysDate as date
datTodaysDate = Date()
if datepart("d",datTodaysDate)=1 then lblYourLabel.visible = true
Else lblYourLabel.visible = false
end if
Exit sub

On your OnClose event add the following:
If lblYourLabel.visible = true then
lblYourLabel.visible = false
End If

The above code will only work on the first day of the month. I'm not sure
if you can use "if datepart("d",datTodaysDate)=1 to 5 then..." to select a
range of days instead of just one date.
 
Back
Top