Update query; updating subform and not main form for random records

natalia83uraqt

New member
Local time
Yesterday, 16:40
Joined
Jul 29, 2010
Messages
2
I have a form and a subform. I run an update query and based on the value of a text box in the subform it should update a text box in the main form. The query is set to update in a macro.

When the macro runs on some accounts it updates the main form and the subform, on other accounts it just updates the subform. The parameters are set up correctly since it's recognizing all of the correct records, just not updating the main form at times.

I cannot find a constant that would cause the main form to just not update.

When I manually run the update query outside of the macro it will update both the subform and the form on records where through the macro just the subform was updated.
 
Your explanation is very hard to understand. Perhaps if you used REAL information (it doesn't have to be real data, made up can be fine, but it should be real in the sense of how your using things).

And perhaps a screenshot uploaded here would help. Don't upload to one of the photo sharing sites, but do it here. Here's how if you aren't sure.
 
Below is the print screen:

On the Skip tab's subform the [next contact date] will state 11/8/88. Closing this form runs a macro that includes opening an update query.

The update query states IF the skip tab's subform [next contact date] = "11/8/88" then update the skip tab's subform [next contact date] to date() and the main subform's [next contact date] update to "11/8/88"

I have a handful of records where both the subform and the main form are updated correctly and a handful of records where just the subform is updated.

Since the subform is updating I know the update query is recognizing those records it it's parameter. For the accounts that are not updating the main form I tested running just the update query through the navigation pane instead of through the macro. Manually running the macro updated both the subform and the form correctly for all records.

So again I went back and tried through the macro and got the same results. The main form is not being updated on random records.

I don't know why it would update both the subform and the main form when I manually run the update query but not when the update query is opened in the macro.
attachment.php
 

Attachments

  • access.png
    access.png
    68.9 KB · Views: 1,971

Users who are viewing this thread

Back
Top Bottom