Need help on Subforms

MICHELE

Registered User.
Local time
Today, 22:07
Joined
Jul 6, 2000
Messages
117
I have a form with 2 subforms. I have my subforms totalling on the main form. Now, each time a job is pulled up, I need to make sure the amount on the main form, CONAMT, is equal to the total of the subform. If it isn't equal I need some kind of message to come up on the screen. I'm not sure where to start.
Also, how could I write a query to find all jobs in the main table that don't equal the total of each job in the sub table?
 
If you have two field on your Main form (Main Total and Subform Total) then in the On Current event of the Main form code like this should do what you want:

If Me.MainTotal <> Me.SubformTotal Then
MsgBox "Totals are not the same."
End if

For the queries I would create one to get the totals for the jobs in the sub table. Then use the Query Wizard to find unmatched records....
 

Users who are viewing this thread

Back
Top Bottom