VBA to automatically click the close button on menu item popup.

Snowflake68

Registered User.
Local time
Today, 11:09
Joined
May 28, 2014
Messages
464
Hi its a known fact that there is a BUG in Access 2010 and 2013 (not sure what other version it affects) that when you move the columns around or change the widths in a datasheet on a subform, that the changes DONT Save.

I have found away of forcing the save just by running the menu command for unhidecolumns and then closing the form will force to save changes.

I would like to use this method to just pop up the unhidecolumns window and then close it as a way of tricking Access into saving the datasheet subform. I dont want the user to have to click the close button as this is not user friendly and would only confuse them.

I would like to know if there is a macro or vba command that I can use to automatically click the close button or just close the unhidecolumns pop up automatically. I cannot use the usual DoCmd.Close method as I dont know the name of the system form item, so just wondered if there is a way of automatically closing the form.
 
If a user is in the pop up, how does he get out of the pop up WITHOUT closing it?
Close btn?
 
If a user is in the pop up, how does he get out of the pop up WITHOUT closing it?
Close btn?

Hi Ranman, thank you for your reply.

Yes the user would usually click the Close button but I dont want them to have to do this so just thought I could right some code to click the close button for them.

Still stuck on this one if anyone can assist me please?

Thanks
Caz
 

Users who are viewing this thread

Back
Top Bottom