Results 1 to 4 of 4
  1. #1
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146

    Form is Dirty as soon as I open it

    Apparently my form is Dirty as soon as I open it. If I make no changes and close it my vba message to ask if I want to save it comes up. How do I determine why that's so? The form has two subForms and a subReport.



    Thanks

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,574
    Go through every section of event code that exists.
    Put a breakpoint on the first line of executable code and use F8 from then on.
    If no code in Open event add a MSGBOX and break on that.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146
    Thanks so much. I had previously copied and pasted a form. The original form had code that was causing the issue.

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,425
    For future reference, you might clue in to the fact that you'd need to examine the code by looking at the form when it opens. If you chose to leave record selectors visible and saw that there was a pencil icon in one of them, it means something has started an edit in a record, or has started a new record. That can be as simple as setting a field value in code when a form loads.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Why is this section of the form dirty
    By Lou_Reed in forum Access
    Replies: 4
    Last Post: 01-25-2017, 03:51 PM
  2. use text value when form is dirty...
    By gangel in forum Forms
    Replies: 2
    Last Post: 06-29-2015, 01:15 AM
  3. Replies: 6
    Last Post: 12-23-2013, 07:38 PM
  4. Replies: 1
    Last Post: 12-12-2011, 01:58 PM
  5. On Dirty fires but Me.Dirty = False (v2010)
    By Rod in forum Programming
    Replies: 5
    Last Post: 07-30-2011, 08:42 PM

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