A new responsibily assigned is to oversee all the projects our department. Nothing formal in the past. I created a Access db with a main menu that links to forms and predeveloped reports. Users wanted to be able to see only their information as well as globally. I created a button on the menu to "personalize" their menu. This opened a form where they choose their name from a combobox. This action set a temporary variable with their name[UserName] and opened a second identical menu to the main menu. All further queries and reports used the temp var as the query. In the corner of their personalize menu was a button that stated "globalize". This removed the temp var and opend the original Main Menu. This works, but I have two identical menus, queries,etc and as I expand I do double work.
My question is how could this be done with only one menu, etc? I would like the globalize/personalize button (btnStatus) to change captions and state when clicked. I arrived at the below by logic only and no knowledge was involved. The problem with being a absolute beginner is you don't know what you don't know.
Sorry I mixed the little code I know wth English
Any help would be much appreciated.Code:MainMenu (OnLoad) loads in global state btnStatus.caption = Personalized. btnStatus OnClick Opens ChooseNameForm ‘employee picks name from combobox [cboSelectName] In combobox AfterUpdate property start macro Action: SetTempVar Argument: UserName, [Screen].[ActiveControl].[Value] btnOK (onClick) go back to mainmenu change btnStatus.caption = Globalize Now if they clicked the button again the reverse would happen and the TempVar UserName would be removed. How would this change my queries? Currently "EmployeeName"=[TempVars]![UserName] in the personalized queries and the Criteria is left blank in the second globalize query.