Mesage box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have a table called 'tbl Actioned by' it has 3 fields
DateActioned1, DateActioned2 and Actionedby.

DateActioned1 is for when the stats were last done
DateActioned2 is for when they are due next.

At the start of each month the user does the stats and then amends the two
dates.
I would like to make a message box that pops up a the Switchboard to remind
the user to do the stats if Dateactioned2 is equal to or has gone past the
current date.

I hope this make sense. Thankyou

steve
 
Hi Steve

Use the DCount function to see if there are any records with DateActioned2
on or before the current date and, if so, use MsgBox to display the message:

If DCount( "*", "[tbl Actioned by]", "DateActioned2<=Date()" ) <> 0 Then
MsgBox "Time to do the stats"
End If
 
Steve,
It may not be the prettiest solution, but here is one idea.
Make the controlsource for the switchboard form the tblActioned by table
and add a field for Dateactioned2 on the form and set it's visible property
to false.

In the form on open event add the following event procedure

If Me.DateActiond2<=Date() Then
msgbox("You need to do the stats")
End If

Hope that helps,
Beth
 
Many Thanks - works a treat!

steve

Graham Mandeno said:
Hi Steve

Use the DCount function to see if there are any records with DateActioned2
on or before the current date and, if so, use MsgBox to display the message:

If DCount( "*", "[tbl Actioned by]", "DateActioned2<=Date()" ) <> 0 Then
MsgBox "Time to do the stats"
End If

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Steve M said:
Hi
I have a table called 'tbl Actioned by' it has 3 fields
DateActioned1, DateActioned2 and Actionedby.

DateActioned1 is for when the stats were last done
DateActioned2 is for when they are due next.

At the start of each month the user does the stats and then amends the two
dates.
I would like to make a message box that pops up a the Switchboard to
remind
the user to do the stats if Dateactioned2 is equal to or has gone past the
current date.

I hope this make sense. Thankyou

steve
 
Back
Top