Share via

Warning about update query when form opens

Anonymous
2022-05-05T15:34:38+00:00

Hi,

I have been tasked with trying to solve some issues in an Access application that I did not develop. One of these issues is that when one particular form is open, a warning is displayed that "You are about to run an update query that will modify data in your table. Are you sure you want to run this type of action query?." If I click 'No', I am presented with the same message several times. I put breakpoints at the start of the VBA code in the Form_Open, Form_Current, and Form_BeforeInsert events, hoping that if I got into whatever code runs automatically when the form opens, I'd be able to figure out where an update query is getting triggered. I found that when I open my form, I get the the error message before I get to any of my breakpoints.

This is a fairly complex form that has a few subforms. I checked out the Record Source of the main form and I am pretty sure all the subforms, and nothing makes me think that any of these is an "update query". I tried adding breakpoints to the beginning Form_Open code in all the subforms and I still get the warning message before I hit any of my breakpoints.

The warning message is very non-descriptive in as far as I can tell, it offers no information regarding what the update query would be doing or from where it is being called. If anyone has an idea how I might be able to determine this information, I would greatly appreciate it.

Thanks in advance,
Paul

Microsoft 365 and Office | Access | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
2022-05-05T16:10:45+00:00

One other idea is to temporarily delete all update queries in a copy of your app. The error message will then say something like "can't find myUpdateQuery".

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

George Hepworth 22,855 Reputation points Volunteer Moderator
2022-05-05T15:47:51+00:00

Trouble-shooting is as much an art as a science.

Be creative. Create a back up to work on as the first step.

Begin eliminating things like subforms and rowsources for list and combo boxes, ONE at a time. Eventually, you should be able to identify the culprit.

Alternatively, create new form and subforms and begin adding to them, again one at a time, until the problem reappears.

The fact that this appears to be an action query suggests it's not a form record source, nor a row source for a list or combo box, but be thorough.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2022-05-27T14:57:12+00:00

    Thank you Tom and George, and sorry for the slow response. Your suggested helped me isolate the problem. There was a sub-form that was in fact running an update query. I now understand why running this update query is desired behavior, and now that I understand this, I feel safe in suppressing the warning messages.

    I appreciate your help!

    Best regards,
    Paul

    Was this answer helpful?

    0 comments No comments