I have 2 very similar reports. One is initiated off of an update form, the other is initiated off of an add form.
In both cases, I have similar data.
I have the following code on the report which comes from the update screen, which is working as I want to format the IDText field:
Private Sub Report_Load()
If Me!IDType = "FEIN" Then
Report!IDText.InputMask = "##-#######"
End If
If Me!IDType = "SSN" Then
Report!IDText.InputMask = "###-##-####"
End If
If Me!IDType = "CERT" Then
Report!IDText.InputMask = "##-##########-#"
End If
If Me!IDType = "BP" Then
Report!IDText.InputMask = "##########"
End If
End Sub
When I put the same code on the report which comes from the add screen, I get a runtime error 438 "Object doesn't support this property or method."
I don't understand why it would work on the report from the update screen, but not on the report from the add screen. The button from the update screen runs a query to get the data, then opens a report. The button from the add screen first saves the record, then runs a query to get the data, then opens a report. Very, very similar. I'm stumped. Appreciate your help!!