Sorry, been away at meetings and on other priorities.
I can do so, but its the other way around. When I am in the subform, I want to manipulate the data in the main form. Me.Form_Donations.Err = "X". I am pretty sure I tried that first, but tried several things since so can't recall. I will try again. Here is the screenshot.
temp1.jpg
The circle shows current entry on subform. I drew the arrow to show two places that are edited as soon as the user touches the <Tab> key. The 1.00 amount will become 0.00 and that works. The "X" in the main form will become blank. And it works as well, but doing so causes the cursor to jump up to the top line, which indicates to me that a requery occurred in the subform.
Okay, so I got it to work. YAY!!!!
Private Sub Amount_AfterUpdate()DoCmd.RunCommand acCmdSaveRecord
Form_Donations.MainFormMath
If MyMath = 0 Then Form_Donations.ErrBox = "" Else Form_Donations.ErrBox = "X"
Form_Donations.Dirty = False
End Sub
Before I had the MainFormMath set the X, because it needs to be there when the upper donation record is entered (no data below so out of balance). Math is done and the visual markers ('X' and outstanding amount) are set in red. So when entries were made in the subform, the afterupdate would trigger it to go back to the main form vba to redo the math. It was there that the amounts were being set, and for some reason manipulating the data by the textbox did not allow me to save the main record and while I worked on the rest of the subform, the main form was still in edit mode. Force saving caused code errors. So I tried the update query which changed the data directly, but forced a requery of the subform. I now added the line below the MainFormMath, which manipulates the data as you suggested, and it allows the save, and doesn't requery the subform. I am not sure why or how, but it works. Now I need to do a simple fix to create the 'X' in the mainform, but there are lots of ways to do that.
But on another topic, you will see I used the DoCmd to save the subform record while in the subform vba. How would I do the same for the Form_Donations while inside the subform?
Thanks so much for your help.
Gary