gnarpeggio
Registered User.
- Local time
- Today, 02:14
- Joined
- Jun 22, 2010
- Messages
- 74
Hello,
I'm working on a database currently that needs validation of an amount before a record can be saved. Since I'm very new to VBA, I'm hoping someone might be able to assist me in this procedure.
So my database is working with checks and monetary deposits. On the particular form I'm working on, I need to assign a module to a field that will check the sum of a field located within a subform and compares or validates it with the amount entered on this specific field.
Here's my problem. Since the "Total" field only returns a value (I've set the Control Source property to =Sum(Amount)), I'm not sure if I can set the module to do this.
Basically, I need my DB to do the following:
On the BeforeUpdate Event, the module will assess the data after the "Total" sum has been caluculated and then compare it with what the user enters in the "TotalAmount" field. Example, if the total amount was $1,000 and the user entered $1,001, then the module would alert the user that these fields do not match.
If there is any way to do this, please provide some insight.
Thank you!
I'm working on a database currently that needs validation of an amount before a record can be saved. Since I'm very new to VBA, I'm hoping someone might be able to assist me in this procedure.
So my database is working with checks and monetary deposits. On the particular form I'm working on, I need to assign a module to a field that will check the sum of a field located within a subform and compares or validates it with the amount entered on this specific field.
Here's my problem. Since the "Total" field only returns a value (I've set the Control Source property to =Sum(Amount)), I'm not sure if I can set the module to do this.
Basically, I need my DB to do the following:
On the BeforeUpdate Event, the module will assess the data after the "Total" sum has been caluculated and then compare it with what the user enters in the "TotalAmount" field. Example, if the total amount was $1,000 and the user entered $1,001, then the module would alert the user that these fields do not match.
If there is any way to do this, please provide some insight.
Thank you!