Results 1 to 4 of 4
  1. #1
    joshhud is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    3

    Date Specifc message box

    Hi All, I have an access database with a front end. I want to create a message box to appear on certain dates when the front end is loaded. Is this possible?

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    Yes that is possible. It is custom of course. I would suggest a Message table that contains a date field and a message field. You would populate that.

    Make a query that will find today's Date/Message so it returns only 1 record; the criteria is: Date() - save and name that query: MessageTodayQ You can run this query stand alone to test it.

    Then in the OnOpen event of your form; have a DLookUp function as the source for an unbound text box: =DLookUp("MessageFieldName","MessageTodayQ")

  3. #3
    joshhud is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    3
    Could i not do something along the lines of

    If format(now(), "MM/DD/YYYY") = "07/13/2016"
    then MsgBox "DO something important"

    I feel like i should be able to, but its not working.

  4. #4
    joshhud is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    3
    K.I.S.S.

    Private Sub Form_Open(Cancel As Integer)
    If date = "7/13/2016" Then
    MsgBox "Say Something"
    End If
    End Sub

    Looks like this worked!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Warning Message After Changing Date
    By Mahendra1000 in forum Access
    Replies: 4
    Last Post: 08-07-2015, 07:38 AM
  2. Message Box Based on Date Range
    By MSAccessOldTimer in forum Programming
    Replies: 4
    Last Post: 05-14-2012, 04:25 PM
  3. Date Range with Error Message Box
    By Huddle in forum Access
    Replies: 4
    Last Post: 05-11-2012, 01:33 PM
  4. Replies: 4
    Last Post: 08-26-2010, 09:44 PM
  5. Warning Message for Missed Date
    By maintt in forum Access
    Replies: 2
    Last Post: 07-23-2010, 09:05 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