validate form totals

slyscurry

New member
Local time
Today, 13:11
Joined
Aug 7, 2008
Messages
2
Hi,
I have a form with a subform that's a datasheet. I have one field in the parent form that equals a number (called "transactionAmount"). I have a column of numbers in the sub form data sheet. I have been able to create a new field (called "lineItemTotal") placed in the parent form footer that adds these sub form values up.
I am now trying to validate my form to make sure transactionAmount = lineItemTotal before a user clicks to a new record. If they don't equal i don't want a new record to appear, but instead a message saying "these amounts must total", or something to that extent.

Thanks!
 
This site should help you out, with the correct syntax for referencing your various controls.
 
thanks, that helps. but where do i input the validation syntax to prompt this message before a new record is shown?
 
You could test the difference between the two totals each time a new value is added to your subform. You will have to ensure that the total on your subform has updated first though.
 

Users who are viewing this thread

Back
Top Bottom