Link to home
Start Free TrialLog in
Avatar of stummj
stummjFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Cant save modified code in MS Access

Ive inherited an MS Access front end to a mySQL database.
There is a module that contains code that is supposed to run on the mySQL server rather than ms Access for performance reasons.

SOmething is wrong with it and I need to add some debug code to see whats going on.

However although I can change the code, the save button is greyed out.

Any idea why and how I can overcome it?
Avatar of mbizup
mbizup
Flag of Kazakhstan image

If you close Access entirely, are you prompted to save changes to the module (and if so, do the changes get saved)?

Also, just verifying - are you looking at the Save button in the VBA editor (as opposed to the save button in the main Access window)?
I don't follow at all.
How can code in your Access app run in a different application?
I occasionally run into issues similar to this. I can edit my code, but Access won't allow me to save it (the button isn't disabled in my case, it just won't save).

The only "fix" I have found is to close/reopen all Access sessions. This works most of the time, but sometimes I've had to reboot my machine entirely. Granted I have multiple development sessions open at once - Access VBA, Excel VBA, Visual Studio, Expressions, etc etc - so that may have something to do with it.
Avatar of stummj

ASKER

mbizup - yes it's in the VBA editor
peter57r - you do it by using the conODBC.Execute method
LSMConsulting that is the same symptom - except I can never save it!

More infomation:

In the project window, I can see 3 projects. 2 of them I can't save any code changes, one of them I can. Is this relevent?
ASKER CERTIFIED SOLUTION
Avatar of stummj
stummj
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stummj

ASKER

self solved