G
Guest
Hi,
I have a form with a subform on it. The subform displays information
including an amount field. There are instances in which I would like to see
(& print) this form when the subform displays 6 decimal places, and there are
times that I'd like to see (& print) with only 1 decimal place. I would like
to call a function from either a button or a menu item to accomplish this.
In addition, there is a total textbox on the main form that sums the subform
info. I would like the same functionality for the textbox as well. Here's
where I'm at:
Private Sub test_Click()
Forms![Asset Look Ahead].Section("Detail").Visible = False
Forms![Asset Look Ahead]![Total].DecimalPlaces = 1
Forms![Asset Look Ahead]![MySubForm]![Amount].DecimalPlaces = 1
Forms![Asset Look Ahead].Section("Detail").Visible = True
End Sub
This code works for changing the "Total" box to 1 decimal, but fails on
trying to change the subform. Any suggestions?
I have a form with a subform on it. The subform displays information
including an amount field. There are instances in which I would like to see
(& print) this form when the subform displays 6 decimal places, and there are
times that I'd like to see (& print) with only 1 decimal place. I would like
to call a function from either a button or a menu item to accomplish this.
In addition, there is a total textbox on the main form that sums the subform
info. I would like the same functionality for the textbox as well. Here's
where I'm at:
Private Sub test_Click()
Forms![Asset Look Ahead].Section("Detail").Visible = False
Forms![Asset Look Ahead]![Total].DecimalPlaces = 1
Forms![Asset Look Ahead]![MySubForm]![Amount].DecimalPlaces = 1
Forms![Asset Look Ahead].Section("Detail").Visible = True
End Sub
This code works for changing the "Total" box to 1 decimal, but fails on
trying to change the subform. Any suggestions?