iam a newbee in ms access .iam trying to make a payment processing database.
i have landed up in trouble with using a checkbox.
the problem is
theres a textbox "amount pending"
another textbox is "amount recieved"
i have a checkbox called "status"
i want the checkbox to be ticked if "amount pending" = "amount recieved"
Thankks a lot for your valuable time and suggestion.
I want the checkbox to be automatically ticked when the "amount pending" equals "amount recieved"
i enterd the code in my afterupdate event for both the textbox.
It dosent seem to work
Last edited by krishnanhemanth; 05-26-09 at 11:28.
in the examples provided note the spelling you have recieved and the examples has received
Second, Startrekker's example is simpler but it will work for the following;-
When Amount Pending and Amount Received are ticked then Status will be ticked this meets your requirement.
But, it will not work for the following when after your updating suppose Amount Received and Amount Pending have a condition where they are both unticked then the Status checkbox would be ticked this does not meet your requirement.
You will need something like this.
If Me![amount pending] = True And Me![amount received] = True Then
Me!status = True
Me!status = False
Ok, so now you have a problem which is caused by the desire to store a value that should only ever be calculated.
The code in post 3 applies, but the problem is WHEN to execute it. It can't be after update because it is never updated. Pity there is no afterupdate for a subform object.
You could try subform_Exit and Form_Current... not sure as I just recalculate such fields, I don't try to store them. Every time I have tried to store a value that should be calculated, I end up removing it down the track. They are just sooo problematic.