G
Guest
I have an unbound text box on a subform. There is an On Current event
procedure for the subform that populates the box. The value shows on the
print preview for the form and prints if I print the subform alone. But it
won't print when I print the main form. This is a form I inherited from a
client and have had to incorporate into my new database, so switching to a
report is not an option. (It was working up until I added the code, and
they've used for a few years now - you know the obstables.)
Here's the procedure:
Private Sub Form_Current()
Dim Owner_Int As Double
Owner_Int = Me![Net_Acres] / Me![Gross_Tract]
If Me.Net_Acres = Me.Gross_Tract Then
Me.MinOwnerInt = 1
Else: Me.MinOwnerInt.Value = Owner_Int
End If
If Me![Net_Acres] > Me![Gross_Tract] Then
MsgBox ("Net Acres Cannot be greater than Gross Tract")
End If
End Sub
I thought of switching it to the On Current event for the Main form, but the
fact that it shows on the print preview makes me think that's not the issue.
Thanks for your help.
procedure for the subform that populates the box. The value shows on the
print preview for the form and prints if I print the subform alone. But it
won't print when I print the main form. This is a form I inherited from a
client and have had to incorporate into my new database, so switching to a
report is not an option. (It was working up until I added the code, and
they've used for a few years now - you know the obstables.)
Here's the procedure:
Private Sub Form_Current()
Dim Owner_Int As Double
Owner_Int = Me![Net_Acres] / Me![Gross_Tract]
If Me.Net_Acres = Me.Gross_Tract Then
Me.MinOwnerInt = 1
Else: Me.MinOwnerInt.Value = Owner_Int
End If
If Me![Net_Acres] > Me![Gross_Tract] Then
MsgBox ("Net Acres Cannot be greater than Gross Tract")
End If
End Sub
I thought of switching it to the On Current event for the Main form, but the
fact that it shows on the print preview makes me think that's not the issue.
Thanks for your help.