Greetings to the well of knowledge...
I've read a few posts about this particular error occurring ad now it is with my particular project.
Let me preface this by saying that I just recently switched over to using Access 2016. When doing this sort of simple programming under Access 2010, I have never ever encountered this error in any form.
So here is my code. Nothing that I haven't written millions of times before without issue.
Private Sub ShowFormInfo()
' Show provider information if the Provider radio button was selected.
Me.ProviderInfoHeader.Visible = False
Me.ProviderContactName.Visible = False
Me.ProviderPosition.Visible = False
Me.ProviderAgency.Visible = False
Me.ProviderEmail.Visible = False
Me.ProviderPhoneNumber.Visible = False
Me.ProviderFaxNumber.Visible = False
If Me.ParentOrProvider = "Provider" Then
Me.ProviderInfoHeader.Visible = True
Me.ProviderContactName.Visible = True
Me.ProviderPosition.Visible = True
Me.ProviderAgency.Visible = True
Me.ProviderEmail.Visible = True
Me.ProviderPhoneNumber.Visible = True
Me.ProviderFaxNumber.Visible = True
End If
End Sub
The form throws runtime error 242 at the If statement. The field, Me.ParentOrProvider, is in the recordset which is a basic SELECT query. I initially tried to execute this with the field not visible (desired) but tried running it with the field visible, but no love.
This is really frustrating and I'd appreciate another set of eyes on this.
Regards,
Ken :banghead:
I've read a few posts about this particular error occurring ad now it is with my particular project.
Let me preface this by saying that I just recently switched over to using Access 2016. When doing this sort of simple programming under Access 2010, I have never ever encountered this error in any form.
So here is my code. Nothing that I haven't written millions of times before without issue.
Private Sub ShowFormInfo()
' Show provider information if the Provider radio button was selected.
Me.ProviderInfoHeader.Visible = False
Me.ProviderContactName.Visible = False
Me.ProviderPosition.Visible = False
Me.ProviderAgency.Visible = False
Me.ProviderEmail.Visible = False
Me.ProviderPhoneNumber.Visible = False
Me.ProviderFaxNumber.Visible = False
If Me.ParentOrProvider = "Provider" Then
Me.ProviderInfoHeader.Visible = True
Me.ProviderContactName.Visible = True
Me.ProviderPosition.Visible = True
Me.ProviderAgency.Visible = True
Me.ProviderEmail.Visible = True
Me.ProviderPhoneNumber.Visible = True
Me.ProviderFaxNumber.Visible = True
End If
End Sub
The form throws runtime error 242 at the If statement. The field, Me.ParentOrProvider, is in the recordset which is a basic SELECT query. I initially tried to execute this with the field not visible (desired) but tried running it with the field visible, but no love.
This is really frustrating and I'd appreciate another set of eyes on this.
Regards,
Ken :banghead: