Runtime Error 2424

KACJR

Registered User.
Local time
Yesterday, 19:09
Joined
Jul 26, 2012
Messages
98
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:
 
Hi Ken. What is the error description or message for runtime error 2424?
 
By 'field visible' you mean a control - textbox, combobox, etc. ?

Why have this data conditionally display? Why not just always display? Why should user have to make this choice?
 
I should also add that all of the other "Provider..." fields display as #Name? in the form.
 
I should also add that all of the other "Provider..." fields display as #Name? in the form.
Are you able to post a sample copy of your db with test data?
 
By 'field visible' you mean a control - textbox, combobox, etc. ?

Yes, all text boxes.



Why have this data conditionally display? Why not just always display? Why should user have to make this choice?


The data is provided from an external web form source and fills the form so that it can be viewed (not edited). The "user" chooses" this from the web form and the data is written to the table from the web form. Basically, the form asks if the application is being filled out by a parent or a service provider. If it is a service provider then it asks for additional info about the service provider. This data would be visible in the Access form only if service provider was checked..
 
Hi Ken. What is the error description or message for runtime error 2424?


"The expression you entered has a field, control, or property name the <application> can't find."
 
Are you able to post a sample copy of your db with test data?


Unfortunately, I can't. It's all linked tables from an SQL Server DB. The Access piece is just a front end.
 
I must also mention that these "Provider..." fields were just added to the DB using Access 2016. If I do this using Access 2010, no errors.
 
Unfortunately, I can't. It's all linked tables from an SQL Server DB. The Access piece is just a front end.
How about images then? If you're getting a "can't find error" at Me.ParentOrProvider, what happens if you use a bang operator? For example:
Code:
Me!ParentOrProvider
 
How about images then? If you're getting a "can't find error" at Me.ParentOrProvider, what happens if you use a bang operator? For example:
Code:
Me!ParentOrProider


Me! = No good.
 
Make a copy of frontend, remove table links and import data to local tables, remove confidential info.

Unfortunately, I cannot test Access 2016.
 
Something amiss in Access 2016???


I just took the last good version of the DB and made the same changes to the DB using Access 2010 and no errors are being thrown, either in Access 2010 or Access 2016.


This is weird.
 
Sorry, what does "no good" mean? Did you get the same error message? Did you notice the typo I had earlier?


Yes. I noticed the typo.


I changed all Me. references to Me!...these did not work.
 
Yes. I noticed the typo.


I changed all Me. references to Me!...these did not work.
Hi. Sorry again, since we cannot see what you're doing, saying "did not work" doesn't tell us much to be able to help you. For example, let us know if you received an error or it didn't do what you expected to happen. In which case, what exactly did it do? A little more info might help us pinpoint the problem better. Thanks.
 
I just took the last good version of the DB and made the same changes to the DB using Access 2010 and no errors are being thrown, either in Access 2010 or Access 2016.

"No errors are being thrown." Does that mean the problem is now solved?

If that is NOT what you meant, please try to be more precise in what you tell us.
 

Users who are viewing this thread

Back
Top Bottom