Weird errors from table field name change

hokiewalrus

Registered User.
Local time
Yesterday, 21:13
Joined
Jan 19, 2009
Messages
50
Ok, I honestly have no idea what the problem is here, but it's giving me show-stopping errors and I need some help.

In my program if I try to either add a field to a table or change the name of an existing field, I cannot reference the new field in the code, I get an error (usually "Variable not defined" in the code for the table's subform).

Then, if I try to add the new field to the subform I get an error wherever I try to reference the subform ("Form method of _Subform failed") most of the time, although some of the time I just get a dialog box that pops up and asks me to specifiy the relationship between 2 tables that have nothing to do with each other.

I really can't understand what the problem is, I made a similar change to my tables on Wednesday and everything worked like I expected (IE, I could reference the edited field name without incident), but doing the same thing today causes everything to blow up.

Has anyone ever heard of anything like this happening?
 
Every time you change a field name it is usually necessary to refresh the form RecordSource by clearing the RecordSource and then set it again.
 
Ah, that was it!

It seems like it should just update dynamically so it never occurred to me to try that. Thanks so much, victory is mine!
 
Access actually creates a hidden query when you assign the RecordSource. You have to kick it in the pants so it will do it again. :D
 

Users who are viewing this thread

Back
Top Bottom