SlideShare a Scribd company logo
1 of 4
A2 MODULE 6

                    MACROS & COMMAND BUTTONS

A macro is a set of one or more actions that each performs a particular operation, such as opening a form
or printing a report. Macros can help you to automate common tasks. For example, you can run a macro
that prints a report when a user clicks a command button.
   1.   In the Database Window, click Macros under Objects.

   2.   Click the New button on the Database window toolbar.

   3.   In the Action column, click in the first cell and then click the arrow to display the action list.

   4. Browse through the actions you can apply. Below is a list explaining the actions in more detail:

                               Action                                       Details

            ApplyFlter                                       Restricting data

            FindNext, FindRecord                             Move through data

            GoToControl, GoToPage, GoToRecord                Move through data

            RunCommand                                       Execute a form or report

            Quit                                             Exit MS Access

            OpenQuery, RunCode, RunMacro,                    Run a macro, procedure or query
            RunSQL

            RunApp                                           Run another application

            CanelEvent, Quite, StopAllMacros,                Stop execution
            StopMacro

            OutputTo, SendObject                             Export MS Access objects to other
                                                             applications

            TransferDatabase, TransferSpreadsheet,           Transfer data between MS Access
            TransferText                                     and other formats.

            CopyObject                                       Copy

            Rename                                           Rename

Mrs Neal
                                        04/07/2012
Action                                       Details

           Save                                        Save

           DeleteObject                                Delete

           Maximize                                    Maximize window when opened

           Minimize                                    Minimize window when opened

           MoveSize                                    Resize a window

           Restore                                     Restore

           Close                                       Close an object

           OpenForm, OpenModule, OpenQuery,            Open or an object
           OpenReport, OpenTable

           OpenForm, OpenQuery, OpenReport,            Print an object
           Printout

           SelectObject                                Select an object

           SetValue                                    Set a value of a field, control or
                                                       property

           RepaintObject, Requery, ShowAllRecords      Display updated data or screen

           AddMenu                                     To create a custom menu bar,
                                                       shortcut menu

           SetMenuItem                                 Set menu items on the custom menu
                                                       bar or shortcut menu.

           Echo, Hourglass, MsgBox, SetWarnings        Display information on screen

           SendKeys                                    Generate keystrokes

           ShowToolbar                                 Display or hide command bar

           Beep                                        Sound of a beep



Put it into Practice:
   1. Open a database you have previously created (ensure it includes a form)

Mrs Neal
                                     04/07/2012
2.   In the Database Window select Macros and click New.
   3.   Click the drop down box within the Action column, and select Maximize.
   4.   Save the macro as mrcMax, and close the macro window.
   5.   Now open a form you have crated in Design View.
   6.   In the top left hand corner (at the insertion point of the rulers) right-
        click the black square and select Properties.
   7. The Form Properties box is displayed.
   8.   Click the Event tab.
   9.   Click On Open.




   10. Click the down arrow; a list of macros you have set will be displayed. Choose mcrMax.

   11. Close the form.

   12. Open the form, you will see the macro runs as soon as the form opens, and the form window is
       maximised.

   Grouping Relating Macros

   The following example shows how you can group two macros under one name.

   1. You will need to have already created a database, which contains a form.

   2.   In the database window select Macros and click New.

   3. Click the Macros Names icon.

   4.   A Marco name column will be displayed. Enter the name mcrAddClient.

   5.   In the Action column select the OpenForm.

   6.   In the bottom half of the window select the relevant form (Form Name) this specifies which form
        is to be opened.

Mrs Neal
                                         04/07/2012
7.   When the form is opened we want to be able to add a new record, therefore we need another
        action. In the second line of the Action column select GoToRecord, within the Record Action
        argument select New:




   8.   Save the macro as mmnuClient.

   9. Run the macro by clicking the Run icon on the toolbar.

   10. The form should open ready for you to enter a new record.

   Command Buttons

You can create a command button on your own, or you can have Microsoft Access create your command
button for you using a wizard. A wizard speeds up the process of creating a command button because it
does all the basic work for you. When you use a wizard, Access prompts you for information, and then
creates the command button based on your answers.
You can create over 30 different types of command buttons by using the Command Button Wizard. For
example, you can create a command button that finds a record, prints a record, or save.
   1. Open a form in Design View.

   2.   In the toolbox, click the Command Button tool.




   3. On the form, click where you want to place the command button.

   4.   Follow the directions in the wizard dialog boxes. In the last dialog box, click Finish to display the
        command button in Design View.




Mrs Neal
                                       04/07/2012

More Related Content

Viewers also liked

5 things every retailer should know
5 things every retailer should know5 things every retailer should know
5 things every retailer should knowLeavs Ltd
 
Doublebookings1
Doublebookings1Doublebookings1
Doublebookings1JTHSICT
 
E book example
E book exampleE book example
E book exampleJTHSICT
 
Validation
ValidationValidation
ValidationJTHSICT
 
Carbon report-slideshow
Carbon report-slideshowCarbon report-slideshow
Carbon report-slideshowLeavs Ltd
 
It4 Coursework Help
It4 Coursework HelpIt4 Coursework Help
It4 Coursework HelpJTHSICT
 

Viewers also liked (13)

Access3
Access3Access3
Access3
 
Access1
Access1Access1
Access1
 
Access2
Access2Access2
Access2
 
5 things every retailer should know
5 things every retailer should know5 things every retailer should know
5 things every retailer should know
 
Doublebookings1
Doublebookings1Doublebookings1
Doublebookings1
 
E book example
E book exampleE book example
E book example
 
Access5
Access5Access5
Access5
 
Finance report
Finance reportFinance report
Finance report
 
Validation
ValidationValidation
Validation
 
Access2
Access2Access2
Access2
 
Carbon report-slideshow
Carbon report-slideshowCarbon report-slideshow
Carbon report-slideshow
 
It4 Coursework Help
It4 Coursework HelpIt4 Coursework Help
It4 Coursework Help
 
Globalization
GlobalizationGlobalization
Globalization
 

Similar to Macros

The Ring programming language version 1.9 book - Part 82 of 210
The Ring programming language version 1.9 book - Part 82 of 210The Ring programming language version 1.9 book - Part 82 of 210
The Ring programming language version 1.9 book - Part 82 of 210Mahmoud Samir Fayed
 
Automation anywhere Training Materials
Automation anywhere Training MaterialsAutomation anywhere Training Materials
Automation anywhere Training MaterialsShekar S
 
Designing for Windows Phone 8
Designing for Windows Phone 8Designing for Windows Phone 8
Designing for Windows Phone 8David Isbitski
 
The Ring programming language version 1.6 book - Part 74 of 189
The Ring programming language version 1.6 book - Part 74 of 189The Ring programming language version 1.6 book - Part 74 of 189
The Ring programming language version 1.6 book - Part 74 of 189Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 81 of 184
The Ring programming language version 1.5.3 book - Part 81 of 184The Ring programming language version 1.5.3 book - Part 81 of 184
The Ring programming language version 1.5.3 book - Part 81 of 184Mahmoud Samir Fayed
 
Data Mining Lab Manual.docx
Data Mining Lab Manual.docxData Mining Lab Manual.docx
Data Mining Lab Manual.docxpadmavathi95
 
Java script frame window
Java script frame windowJava script frame window
Java script frame windowH K
 
personalization
personalizationpersonalization
personalizationsanodia77
 
XPages Blast - ILUG 2010
XPages Blast - ILUG 2010XPages Blast - ILUG 2010
XPages Blast - ILUG 2010Tim Clark
 
Tosca Properties and Standard module Tips.PDF
Tosca Properties and Standard module Tips.PDFTosca Properties and Standard module Tips.PDF
Tosca Properties and Standard module Tips.PDFVijayaragavan k 🌩️
 
The Ring programming language version 1.5.1 book - Part 67 of 180
The Ring programming language version 1.5.1 book - Part 67 of 180The Ring programming language version 1.5.1 book - Part 67 of 180
The Ring programming language version 1.5.1 book - Part 67 of 180Mahmoud Samir Fayed
 
Session 1. Bai 1 ve winform
Session 1. Bai 1 ve winformSession 1. Bai 1 ve winform
Session 1. Bai 1 ve winformmrtom16071980
 
Could not-reconnect-all-network-drives
Could not-reconnect-all-network-drivesCould not-reconnect-all-network-drives
Could not-reconnect-all-network-drivesssuser1eca7d
 

Similar to Macros (20)

MS Access Macros
MS Access MacrosMS Access Macros
MS Access Macros
 
Using macros in microsoft access
Using macros in microsoft accessUsing macros in microsoft access
Using macros in microsoft access
 
The Ring programming language version 1.9 book - Part 82 of 210
The Ring programming language version 1.9 book - Part 82 of 210The Ring programming language version 1.9 book - Part 82 of 210
The Ring programming language version 1.9 book - Part 82 of 210
 
Automation anywhere Training Materials
Automation anywhere Training MaterialsAutomation anywhere Training Materials
Automation anywhere Training Materials
 
007.macro
007.macro007.macro
007.macro
 
Designing for Windows Phone 8
Designing for Windows Phone 8Designing for Windows Phone 8
Designing for Windows Phone 8
 
The Ring programming language version 1.6 book - Part 74 of 189
The Ring programming language version 1.6 book - Part 74 of 189The Ring programming language version 1.6 book - Part 74 of 189
The Ring programming language version 1.6 book - Part 74 of 189
 
The Ring programming language version 1.5.3 book - Part 81 of 184
The Ring programming language version 1.5.3 book - Part 81 of 184The Ring programming language version 1.5.3 book - Part 81 of 184
The Ring programming language version 1.5.3 book - Part 81 of 184
 
Data Mining Lab Manual.docx
Data Mining Lab Manual.docxData Mining Lab Manual.docx
Data Mining Lab Manual.docx
 
VBA Tips
VBA TipsVBA Tips
VBA Tips
 
Chapter 14
Chapter 14Chapter 14
Chapter 14
 
Java script frame window
Java script frame windowJava script frame window
Java script frame window
 
personalization
personalizationpersonalization
personalization
 
XPages Blast - ILUG 2010
XPages Blast - ILUG 2010XPages Blast - ILUG 2010
XPages Blast - ILUG 2010
 
Keyword driven testing in qtp
Keyword driven testing in qtpKeyword driven testing in qtp
Keyword driven testing in qtp
 
Tosca Properties and Standard module Tips.PDF
Tosca Properties and Standard module Tips.PDFTosca Properties and Standard module Tips.PDF
Tosca Properties and Standard module Tips.PDF
 
Excel300
Excel300Excel300
Excel300
 
The Ring programming language version 1.5.1 book - Part 67 of 180
The Ring programming language version 1.5.1 book - Part 67 of 180The Ring programming language version 1.5.1 book - Part 67 of 180
The Ring programming language version 1.5.1 book - Part 67 of 180
 
Session 1. Bai 1 ve winform
Session 1. Bai 1 ve winformSession 1. Bai 1 ve winform
Session 1. Bai 1 ve winform
 
Could not-reconnect-all-network-drives
Could not-reconnect-all-network-drivesCould not-reconnect-all-network-drives
Could not-reconnect-all-network-drives
 

More from JTHSICT

Year 8 sow 2012 2013
Year 8 sow 2012 2013Year 8 sow 2012 2013
Year 8 sow 2012 2013JTHSICT
 
Lookup table
Lookup tableLookup table
Lookup tableJTHSICT
 
Password
PasswordPassword
PasswordJTHSICT
 
Naming conventions
Naming conventionsNaming conventions
Naming conventionsJTHSICT
 
Normalization
NormalizationNormalization
NormalizationJTHSICT
 
Calendar
CalendarCalendar
CalendarJTHSICT
 

More from JTHSICT (6)

Year 8 sow 2012 2013
Year 8 sow 2012 2013Year 8 sow 2012 2013
Year 8 sow 2012 2013
 
Lookup table
Lookup tableLookup table
Lookup table
 
Password
PasswordPassword
Password
 
Naming conventions
Naming conventionsNaming conventions
Naming conventions
 
Normalization
NormalizationNormalization
Normalization
 
Calendar
CalendarCalendar
Calendar
 

Recently uploaded

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Macros

  • 1. A2 MODULE 6 MACROS & COMMAND BUTTONS A macro is a set of one or more actions that each performs a particular operation, such as opening a form or printing a report. Macros can help you to automate common tasks. For example, you can run a macro that prints a report when a user clicks a command button. 1. In the Database Window, click Macros under Objects. 2. Click the New button on the Database window toolbar. 3. In the Action column, click in the first cell and then click the arrow to display the action list. 4. Browse through the actions you can apply. Below is a list explaining the actions in more detail: Action Details ApplyFlter Restricting data FindNext, FindRecord Move through data GoToControl, GoToPage, GoToRecord Move through data RunCommand Execute a form or report Quit Exit MS Access OpenQuery, RunCode, RunMacro, Run a macro, procedure or query RunSQL RunApp Run another application CanelEvent, Quite, StopAllMacros, Stop execution StopMacro OutputTo, SendObject Export MS Access objects to other applications TransferDatabase, TransferSpreadsheet, Transfer data between MS Access TransferText and other formats. CopyObject Copy Rename Rename Mrs Neal 04/07/2012
  • 2. Action Details Save Save DeleteObject Delete Maximize Maximize window when opened Minimize Minimize window when opened MoveSize Resize a window Restore Restore Close Close an object OpenForm, OpenModule, OpenQuery, Open or an object OpenReport, OpenTable OpenForm, OpenQuery, OpenReport, Print an object Printout SelectObject Select an object SetValue Set a value of a field, control or property RepaintObject, Requery, ShowAllRecords Display updated data or screen AddMenu To create a custom menu bar, shortcut menu SetMenuItem Set menu items on the custom menu bar or shortcut menu. Echo, Hourglass, MsgBox, SetWarnings Display information on screen SendKeys Generate keystrokes ShowToolbar Display or hide command bar Beep Sound of a beep Put it into Practice: 1. Open a database you have previously created (ensure it includes a form) Mrs Neal 04/07/2012
  • 3. 2. In the Database Window select Macros and click New. 3. Click the drop down box within the Action column, and select Maximize. 4. Save the macro as mrcMax, and close the macro window. 5. Now open a form you have crated in Design View. 6. In the top left hand corner (at the insertion point of the rulers) right- click the black square and select Properties. 7. The Form Properties box is displayed. 8. Click the Event tab. 9. Click On Open. 10. Click the down arrow; a list of macros you have set will be displayed. Choose mcrMax. 11. Close the form. 12. Open the form, you will see the macro runs as soon as the form opens, and the form window is maximised. Grouping Relating Macros The following example shows how you can group two macros under one name. 1. You will need to have already created a database, which contains a form. 2. In the database window select Macros and click New. 3. Click the Macros Names icon. 4. A Marco name column will be displayed. Enter the name mcrAddClient. 5. In the Action column select the OpenForm. 6. In the bottom half of the window select the relevant form (Form Name) this specifies which form is to be opened. Mrs Neal 04/07/2012
  • 4. 7. When the form is opened we want to be able to add a new record, therefore we need another action. In the second line of the Action column select GoToRecord, within the Record Action argument select New: 8. Save the macro as mmnuClient. 9. Run the macro by clicking the Run icon on the toolbar. 10. The form should open ready for you to enter a new record. Command Buttons You can create a command button on your own, or you can have Microsoft Access create your command button for you using a wizard. A wizard speeds up the process of creating a command button because it does all the basic work for you. When you use a wizard, Access prompts you for information, and then creates the command button based on your answers. You can create over 30 different types of command buttons by using the Command Button Wizard. For example, you can create a command button that finds a record, prints a record, or save. 1. Open a form in Design View. 2. In the toolbox, click the Command Button tool. 3. On the form, click where you want to place the command button. 4. Follow the directions in the wizard dialog boxes. In the last dialog box, click Finish to display the command button in Design View. Mrs Neal 04/07/2012