Results 1 to 5 of 5
  1. #1
    Mahendra1000 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2013
    Posts
    101

    Warning Message After Changing Date

    Hello All,

    I have a database with StartingDate, EndingDate, MonthName, QuarterNumber and YearNumber.As (MonthName, QuarterNumber and YearNumber are based on the EndingDate)

    If user changes the EndingDate then there needs to be an alert message to modify the MonthName, QuarterNumber and YearNumber.

    I used the afterupdate/afterchange events but the access is displaying the alert message if user enters the endingdate for a fresh record.



    I just don't want to show the alert message for the fresh records while entering. It needs to show only when the endingdate is changed after entering at first.

  2. #2
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Can you show us the code you have for the message? How about a separate form for editing?

    So, you would have a list form... then next to each record is a button that opens a sub form to make amendments. The message code could be applied to just this form.

    You could have the main form locked for editing but additions enabled... There's many ways to do it.

  3. #3
    Mahendra1000 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2013
    Posts
    101
    I don't have any code for that. I just created a macro in afterchange property box to display an alert message

  4. #4
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    I'm sure what you're asking for can be done but I'm not too sharp on the macros/vba.

    Click image for larger version. 

Name:	list.png 
Views:	6 
Size:	48.0 KB 
ID:	21558Click image for larger version. 

Name:	Untitled.png 
Views:	6 
Size:	17.0 KB 
ID:	21559

    The first list is locked here. The form that's opened is for adding or editing records. I also have the same form to open blank when add new is clicked.

    It doesn't answer your question but it might give you a different way to achieve it. (you would need a separate form for adding new if your macro applies to all changes)

    Andy,

  5. #5
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    Yes it will display the alert message for any time the control that you are entering the end date in updates. So going from Null -> having data counts as an update and the message will trigger.

    I would go with what Andy suggested and create a button to open up a smaller 'pop-up' style form for editing data.
    If you end up having an alert message to change the other fields, might as well just utilize a small form to edit all at once and instead have the alert message kick if they try and leave the page without editing the other fields.

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

Similar Threads

  1. Pop Message Box Warning
    By data808 in forum Programming
    Replies: 4
    Last Post: 01-11-2014, 04:43 PM
  2. Access Warning Message
    By marksnwv in forum Access
    Replies: 1
    Last Post: 06-01-2012, 01:46 PM
  3. remove Macro Warning message
    By Jerseynjphillypa in forum Programming
    Replies: 3
    Last Post: 05-09-2012, 10:22 AM
  4. Warning Message for Missed Date
    By maintt in forum Access
    Replies: 2
    Last Post: 07-23-2010, 09:05 AM
  5. Access warning message
    By John Southern in forum Access
    Replies: 2
    Last Post: 05-28-2010, 06:01 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