Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UnDo macro command works on one page, but not the other 3

Status
Not open for further replies.

ColdDay

Technical User
Nov 30, 2010
92
US
I have a form in AC2010 with 4 tabbed pages: Add, Edit, Reports and Tables. On the Add page I have a button and macro for clearing the data in the text boxes before saving the info. The macro name is mcr_ClearAddForm. It uses the Undo Record command. It works as it should no matter how many text boxes have info in them.

On the Reports page, I have a macro with the name mcr_ClearReportsForm. The only differences b/w the two macros are: they are for two different pages, they have different names and the GoToControl (after the boxes are cleared) is different. They both use the UnDo Record command.

As I mentioned above, the macro on the Add page works perfectly, but the macro on the Reports page does not clear the text boxes, but it does go to the desired GoToControl.

Is there some way that my Reports page is “locked” after I enter info into a box that prevents my macro from working.

Crl+Z works for the Add page but does not work for the Reports page. These are the only two pages where I need the ability to clear the boxes if I do not want to keep or use the info I have entered.

Thanks.
 
Most people find it easier to not have to use square brackets and therefor avoid slashes "/" in names. Also to be clear that things are controls people generally use prefixes... i.e. cbo for comboboxes, txt for text and pg for page (I think).

If following that you would name your page pgReportsCharts or something similar. It makes no real difference except maybe for maintainability as it is very obvious what the code is doing... Although I would highly recommend not naming your bound controls the same name as the control source, the references can become ambiguous very fast.
 
I had reason to go find this anyway... More on a naming convention...


Truthfully that is more detailed than I ever bothered with (all queries begin qry regardless of type in my naming convention) and I do some things differently in my own naming convention altogether.
 
commonly referenced as Hungarian notation

HTH << MaZeWorX >> "I have not failed I have only found ten thousand ways that don't work" <<Edison>>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top