Hello,
I have a form that when I delete a record I want two queries to run that go through and determine if any records need to be updated in the table because of that delete. There are two tables involved. When the delete occurs it deletes from the Issues table. If there is no longer a related issue in the table I want a field in the Encounter table called SecondEyesNeeded to be set to false.
I have a make table query that determines who should no longer be true that creates a new table and then I have an update query that takes all of the values that come back in the new table and relates to the Encounter table to do the update.
I have tried with VBA and a macro and although the queries work just fine when I run them on my own they do not seem to have any affect through this routes. I have stepped through it and it goes through every step but the value in the table is never updated.
Is there a better way to do what I am doing?
DoCmd.SetWarnings False
DoCmd.OpenQuery "qry_IssueUpdate_SecEyesRemove-1"
DoCmd.OpenQuery "qry_IssueUpdate_SecEyesRemove-2"
DoCmd.SetWarnings True
I have a form that when I delete a record I want two queries to run that go through and determine if any records need to be updated in the table because of that delete. There are two tables involved. When the delete occurs it deletes from the Issues table. If there is no longer a related issue in the table I want a field in the Encounter table called SecondEyesNeeded to be set to false.
I have a make table query that determines who should no longer be true that creates a new table and then I have an update query that takes all of the values that come back in the new table and relates to the Encounter table to do the update.
I have tried with VBA and a macro and although the queries work just fine when I run them on my own they do not seem to have any affect through this routes. I have stepped through it and it goes through every step but the value in the table is never updated.
Is there a better way to do what I am doing?
DoCmd.SetWarnings False
DoCmd.OpenQuery "qry_IssueUpdate_SecEyesRemove-1"
DoCmd.OpenQuery "qry_IssueUpdate_SecEyesRemove-2"
DoCmd.SetWarnings True