4charity
asked on
Compile error: Method or data member not found
I have a form that has a Call to a Sub MakeEditable. There are many fields listed, with an example of a few attached. This call has worked fine, until I replaced some of the field names with new names. They had not prviously existed on the underlying table - I am now using an underlying query. When the Sub goes to run, I get the Compile error message, with either "Enabled" or "SetFocus" highlighted, for one of the new fields. Any idea why this may be happening? The fields that were previously listed in the Sub are fine - no error messages. Also, the new fields are showing up and working as controls on the form
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1. Please respond to omgang's post
2. Whenever your db starts to act funny, make a back up immediately!
3. When you add or change objects, you should always compile the code.
Close the DB, then reopen it.
Then run the Compact/Repair utility.
Then see if it works.
4. If not, then create a new blank db and import all of the objects into it.
Then see if it works.
5. Finally, if that does not fix the issue, then you may have to recreate the form.
Then see if it works.
JeffCoachman
2. Whenever your db starts to act funny, make a back up immediately!
3. When you add or change objects, you should always compile the code.
Close the DB, then reopen it.
Then run the Compact/Repair utility.
Then see if it works.
4. If not, then create a new blank db and import all of the objects into it.
Then see if it works.
5. Finally, if that does not fix the issue, then you may have to recreate the form.
Then see if it works.
JeffCoachman
ASKER
Perfect solution omgang. The controls were not labelled properly. I guess I just assumed that they would take on the name of the bound field.
Jeff, thanks for the tips.
Jeff, thanks for the tips.
ASKER
Open in new window