Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    bishop is offline Novice
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    21

    Help on running macro msgbox on certain dates

    I need a macro msgbox to run automatically on the last day and first day of the month. I have been researching this and cannot find anything on it. Please any help is appreciated.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Do you know how to calculate the Last Day of the Month? Did you want it to run when your application is launched or at some other time?

  3. #3
    bishop is offline Novice
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    21
    Yes I know how to calculate the last day of the month. Just don't know how I would write that up in a code. My macro is named EOM.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    When were you planning to to make the date check, in the AutoExec macro?

  5. #5
    bishop is offline Novice
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    21
    sorry, the application should be up and running on those dates when the msgbox is launched.

  6. #6
    bishop is offline Novice
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    21
    yes in the autoexec

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Do you have a timer event running constantly somewhere?

  8. #8
    bishop is offline Novice
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    21
    No I don't. I am fairly new to all this so the only thing that I have created so far is the msgbox macro. This is the last thing that I need to finish off my database. If you could help me I would really appreciate it.

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    To recap: your application will be started each day and you will check the date in the AutoExec macro, right? Is there a possibility the application will *not* be started on these two days? Does it need to do something different for the 1st vs the last day of the month?

  10. #10
    bishop is offline Novice
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    21
    Correct. The application is run everyday. Now I don't want the message box to appear all day long. So once the msgbox is clicked to remind the person to do what they are suppose to do those days it should not reappear correct? Even if the app is closed and opened up again?

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by RuralGuy View Post
    Is there a possibility the application will *not* be started on these two days? Does it need to do something different for the 1st vs the last day of the month?
    You will need a way to record whether you have shown the message for that day as well. What did you have in mind for that issue?

  12. #12
    bishop is offline Novice
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    21
    don't know. I just thought of that. Like I said I am extremely new to all of this and coding is not my thing.

  13. #13
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about the answers to the other two questions as well?

  14. #14
    bishop is offline Novice
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    21
    the application will not always be up and running. It does not need to do anything different on those 2 days.

  15. #15
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    So you will be doing the same thing on *both* the last and first day of the month or do you just need to do something once a month so you picked either the first or last day as an example?

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. MsgBox strange/missing icon
    By AndrewAfresh in forum Access
    Replies: 6
    Last Post: 11-11-2009, 10:16 AM
  2. Running a VB function in a Macro
    By JuuJuu in forum Access
    Replies: 1
    Last Post: 10-27-2009, 02:50 AM
  3. Replies: 2
    Last Post: 09-30-2009, 09:40 AM
  4. Alterations to MsgBox command
    By Robert M in forum Programming
    Replies: 4
    Last Post: 06-30-2009, 02:14 PM
  5. pass a variable to the MsgBox function
    By 3dmgirl in forum Programming
    Replies: 2
    Last Post: 04-19-2007, 07:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums