Question Locked

Issues After Changing a field Name in a table (Access)

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello, I am not a big MS Access fan, and rarely have to utilize it. Therefore I have limited knowledge of its operation.

I'm dealing with this odd issue. After changing a field name in a table, followed by changing the field name in sql strings in my vba code. I keep getting run-time errors telling me I'm missing a value or a parameter.

The sql string worked before, and all I did was change the field name. It blows me my mind why it wouldn't work anymore. I tried restarting access, my computer, et cetera.

So when you change a field name in a table in access do you have to restart something? Are all the initial field names stored anywhere.

Anyone have an idea?

Thanks.

2 replies

by tony hopkinson

Are you using predefined queries from VBA.
e.g. OrderQuery is Select [Order Number] From [Orders]
and then VBA is doing Select Fom OrderQuery Where [Order Number] > 10000.

If so you might need to go and rebuild them with the new field name.

It's like using a vew in a stored procedure and changing the view, you have to force the SP to recompile to pick up you the new version.

This discussion is closed to new replies.