Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Checkbox 2

Status
Not open for further replies.

dmkennard2

Technical User
Jun 11, 2004
101
GB
Hi,
I have a subform that has customer payment details. ie:
Amount Owed, Amount Paid, Amount Outstanding.
The subform updates the amount outstanding automatically when a payment is made.
I have a checkbox that marks the record paid in full but this is manual, is it possible to have the checkbox change automatically?

The form is using a select statement within the form.

Thanks in advance.
Dazz
 
So, is this now working correctly with no errors?

--

"If to err is human, then I must be some kind of human!" -Me
 
No, i am still having to enter the values twice and then clicking on the "Copy to clipboard" to change the tickbox status.
 
You may try this:
Private Sub Acc_Amt_Paid_AfterUpdate()
Dim strSQL As String
Me.Dirty = False
...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV, Excellent this works and the record changes with one entry.
Another problem though is if i go back and change an entry to not equal the amount due, all the check boxes are cleared, not just the record i am working on.

Dazz
 
dmkennard2,

So, is this a Single (Standard) or Continuous form?

If you have it setup as a Continuous form (Form Properties -> Format -> Default View), and you have this check box in the "detail" section of the form, then that is what is most likely causing your problem.

So, if possible, you could move out the sections that shouldn't change every record to the header or footer, possibly, and see if that helps..

Or another option would be to go to just a "Single Form" as apposed to Continuous - again, if possible for your application.

--

"If to err is human, then I must be some kind of human!" -Me
 
Is the checkbox within your sub form, or is it in the Main Detail area?

--

"If to err is human, then I must be some kind of human!" -Me
 
The check box is in the subform and is ticked when the amount paid is equal to the amount due.
Each record has a checkbox of its own.
 
dmkennard2 said:
PHV, Excellent this works and the record changes with one entry.
Another problem though is if i go back and change an entry to not equal the amount due, all the check boxes are cleared, not just the record i am working on.

So, your text box or combo box or whatever where you are changing "an entry to not equal the amount due": where is that located? In the sub-form or main form?


--

"If to err is human, then I must be some kind of human!" -Me
 
Hi,
I have a subform (Datasheet View) which has, amongst other fields,:
1 - A text are where i enter the amount paid, formated as currency. Stored in the Orders Table.
2 - A total amount payable which is a calculation of other fields on the form and cannot be changed by the user, formated as currency. This is not held in a table just in the query.
3 - A Checkbox to indicate when the record has been fully paid. - Ticked if Amount_Paid = Amount_Payable. Stored in the Orders Table.

PHV's solution solved the problem where i had to enter the value twice and then click copy to clipboard, but if i change any record in the form so that Amount_Paid <> Amount_Payable then all the ticks in the table are unchecked not just the record i am working on.

Thanks again

Dazz
 
Edit to a above

4 - I have an outstanding amount that is not stored in the table. This is what is used for the calculation.

So, Amount_Payable - Amount_Paid = Amount_OutStanding
Checkbox to be ticked if Amount_OutStanding=0

Sorry for the confusion.

Dazz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top