Message box

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

Guest

Hi

I would like to create a message box that displays on the startup frm if the
date/time field on the stats frm is on or has gone past the current date.

At the moment I am using
Private Sub Form Open(Cancel As Integer)
If Day(Date) = 1 Then
MsgBox "Remember to send monthly stats, if already action please ignore"
End If

I do this for day 1,2,3 and 4 in case of weekends etc.

As you can see it does the job but doesnt look very professional as the
message pops up for the first four days of the month even if someone actioned
it first thing on the first.

Any help would be appriciated. Thanks
Steve
 
How would the database know if the action has already been done for the
current month? If you store a value in a table to show that the action was
done, you then can check the table to see if the value is there or not, and
use that in your code to decide whether to show the message box or not.
 
I have two date fields one when stats are 'next due' and one when 'last
actioned.' When the stats are sent the user would then change the next due
to the start of the next month. Not very good on code so any help would be
great.

The date next due is held in a tbl Actioned By

Cheers steve
 
I don't understand the table design that you're using. Provide details about
it in terms of the field names and which field holds which values. Most
likely, using a DLookup function will allow us to do what you seek, but I
need to understand the table's design in order to give you a more specific
suggestion.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top