|  | Check Box to be auto updated |  | |
| | | reterrig |  |
| Posted: Tue Sep 16, 2008 7:36 am Post subject: Check Box to be auto updated |  |
I have created a form "Proforma" & a subform "Proforma Subform". In the subform, in the Form footer, I have a control box "Total Cost" that sum up the amounts from filed "cost" of the same subform. In the form I have a contol box "Total Euros" that is updated from the "Total Cost". In the form I have also a check box "Paid" (control source of the chek box is Paid located in a table) that is auto ticked when amount in "Total Euros" is greater than Zero. This function is only happened when I close and re-open the form. Is any way that the check box to be updated when the "Total Euros" is updated without I close and re-open the form?
Thanks Peter |
| |
| | | BruceM |  |
| Posted: Tue Sep 16, 2008 9:36 am Post subject: Re: Check Box to be auto updated |  |
| |  | |
Since Paid is automatically ticked if TotalEuros is greater than 0 there is no need to store the value. Similarly, you should not be storing TotalEuros if the value is derived from the Sum in Proforma Subform. Instead, an unbound text box (txtTotalEuros) on the main form could have as its Control Source: =Forms![Proforma]![Proforma Subform].Form![txtTotal]
You could have something like this in Proforma Current event: Me.chkPaid = (Me.SubformControlName.Form.txtTotal > 0) You could have a similar expression in the After Update event of a control on the subform: Me.Parent.chkPaid = (Me.txtTotal > 0) Without knowing more details it's hard to know just where this expression would go, but that's the general idea.
In the above, txtTotal is an unbound text box in the subform footer with a Sum expression as its Control Source; chkPaid is an unbound check box on the main form.
If you must do this with stored values for Paid and TotalEuros it is a question of what the expression is and where it is located. You say that you have a function, but that says very little to those who can't see your database.
"reterrig" <reterrig@discussions.microsoft.com> wrote in message news:0FB0C68E-2F1F-40C6-B769-B38F82F23298@microsoft.com...
| Quote: | I have created a form "Proforma" & a subform "Proforma Subform". In the subform, in the Form footer, I have a control box "Total Cost" that sum up the amounts from filed "cost" of the same subform. In the form I have a contol box "Total Euros" that is updated from the "Total Cost". In the form I have also a check box "Paid" (control source of the chek box is Paid located in a table) that is auto ticked when amount in "Total Euros" is greater than Zero. This function is only happened when I close and re-open the form. Is any way that the check box to be updated when the "Total Euros" is updated without I close and re-open the form?
Thanks Peter |
|
| |
| | | reterrig |  |
| Posted: Wed Sep 17, 2008 8:41 am Post subject: Re: Check Box to be auto updated |  |
| |  | |
Thanks for your assistance. Check Box works fine.
"BruceM" wrote:
| Quote: | Since Paid is automatically ticked if TotalEuros is greater than 0 there is no need to store the value. Similarly, you should not be storing TotalEuros if the value is derived from the Sum in Proforma Subform. Instead, an unbound text box (txtTotalEuros) on the main form could have as its Control Source: =Forms![Proforma]![Proforma Subform].Form![txtTotal]
You could have something like this in Proforma Current event: Me.chkPaid = (Me.SubformControlName.Form.txtTotal > 0) You could have a similar expression in the After Update event of a control on the subform: Me.Parent.chkPaid = (Me.txtTotal > 0) Without knowing more details it's hard to know just where this expression would go, but that's the general idea.
In the above, txtTotal is an unbound text box in the subform footer with a Sum expression as its Control Source; chkPaid is an unbound check box on the main form.
If you must do this with stored values for Paid and TotalEuros it is a question of what the expression is and where it is located. You say that you have a function, but that says very little to those who can't see your database.
"reterrig" <reterrig@discussions.microsoft.com> wrote in message news:0FB0C68E-2F1F-40C6-B769-B38F82F23298@microsoft.com... I have created a form "Proforma" & a subform "Proforma Subform". In the subform, in the Form footer, I have a control box "Total Cost" that sum up the amounts from filed "cost" of the same subform. In the form I have a contol box "Total Euros" that is updated from the "Total Cost". In the form I have also a check box "Paid" (control source of the chek box is Paid located in a table) that is auto ticked when amount in "Total Euros" is greater than Zero. This function is only happened when I close and re-open the form. Is any way that the check box to be updated when the "Total Euros" is updated without I close and re-open the form?
Thanks Peter
|
|
| |
|
|