I have a database that was create in Access 2010. We recently updated our systems to Access 2013. In Access 2010 I have no errors accessing a form object with
Form_frmName.txtFieldName.Value
However, when using Access 2013 I get a runtime 2424 error stating that "The expression you entered has a field, control, or property name that Microsoft Access can't find. I am accessing from a module.
The module sets these fields visible using
With Form_frmName
.txtFieldName.Visible = True
End With
before attempting to access them.
Has there been any changes in the way form objects are accessed between 2010 and 2013? Is this an issue others have faced?
In Response to @WayneGDunn's questions below
QUOTE: I need to know exactly what and how you are using this. 1. You have a bound textbox named 'txtFieldName' on a form. As @brad asked, is there a subform, and if so, is this field on the subform? 2. You said the code is in a module, but is the code in the form where the field is defined? 3. Please explain where/what form 'frmQAtab' is (you said your form name was 'frmName', so what is the other, how related?) 4. Is the code in an event? Can you share the entire subroutine? 5. Have you tried creating a dummy query and using the builder to reference the field?
RESPONSE: 1. I have a form (frmMain) with multiple tabbed pages. frmName is one of those tabs, containing the bound field txtFieldName. 2. The module is run from the form the field is in. 3. My apologies frmQAtab is frmName, I just neglected to make that generic in my copy-paste. 4. The event is a button click. The button click runs a sub from a module. That sub makes visible the fields, runs a query based on user input (two date fields), populates the bound fields with the returned record set, then attempts to access them for processing (another query is run to process a complete other set of fields). To post the entire subroutine would be a bit more than I would ask you to chew on. This is legacy code I'm trying to fix, and it's rather large. 5. I have not tried a dummy query. Access is not my field (I'm mainly a C#, scripting, guy.) Is there some suggestions in this area you could give?