I haven't been able to find the answer to this on my own, so I was hoping one of you good people could help me out!
I have a form, [products], that lists sale items. At the bottom of the form I have 3 txt boxes that sum up the information.
The first txtbox, [sale_total], calculates the amount of the current purchase.
The second txtbox, [cash_received], is for the user to enter the amount of money given by the customer.
The third txtbox, [change_due], takes the amount entered in the [cash_received] txtbox and subtracts the amount from the [sale_total] txtbox.
This is done so the user doesn't have to figure out how much change to give the customer... easy enough... but,
What I want to set up is a validation rule in the [cash_received] txtbox. One that will not let the transaction continue if the amount entered in [cash_recieved] txtbox is less than the amount in the [sale_total] txtbox.
I tried to build an expression in the validation rule property for the [cash_received] txtbox like this:
= [cash_received]>[sale_total]
with a validation message that stated the amount wasn't enough to cover the cost. This didn't work because even when I entered an amount 10x the sale_total I recieved the validation message.
I'm sure there is a way to write this expression in code but I don't know how to do coding that well (in my 2nd week of class for VBA). If someone could help I would be forever greatfull
(Also - sorry this is so lengthy but I wanted to be clear)
cheers and good Friday,
Kevin
I have a form, [products], that lists sale items. At the bottom of the form I have 3 txt boxes that sum up the information.
The first txtbox, [sale_total], calculates the amount of the current purchase.
The second txtbox, [cash_received], is for the user to enter the amount of money given by the customer.
The third txtbox, [change_due], takes the amount entered in the [cash_received] txtbox and subtracts the amount from the [sale_total] txtbox.
This is done so the user doesn't have to figure out how much change to give the customer... easy enough... but,
What I want to set up is a validation rule in the [cash_received] txtbox. One that will not let the transaction continue if the amount entered in [cash_recieved] txtbox is less than the amount in the [sale_total] txtbox.
I tried to build an expression in the validation rule property for the [cash_received] txtbox like this:
= [cash_received]>[sale_total]
with a validation message that stated the amount wasn't enough to cover the cost. This didn't work because even when I entered an amount 10x the sale_total I recieved the validation message.
I'm sure there is a way to write this expression in code but I don't know how to do coding that well (in my 2nd week of class for VBA). If someone could help I would be forever greatfull
(Also - sorry this is so lengthy but I wanted to be clear)
cheers and good Friday,
Kevin