Switchboards and Macros

1. Design a switchboard and dialog box for a graphical user interface
2. Run and add actions to macros
3. Single-step a macro
4. Create a macro
5. Add a macro to a macro group
6. Add a command button to a form
7. Attach a macro to a command button
8. Create a dialog box form
9. Add a list box to a form
10. Use an SQL statement to fill a list box with object names
11. Create a macro group
12. Use the Switchboard Manager to create a switchboard
13. Modify a Switchboard.

Important Points.
1. A user interface is what you see and use when you communicate with a computer program.
2. A graphical user interface (GUI) displays windows, menu bars, pull-down menus, dialog boxes, and graphic pictures (icons) which you use to communicate with the program.
3. A switchboard is a form that appears when you open a database.
4. Command buttons provide access to all the options available to the user.
5. A restricted ribbon contain only selected options on the home tabe tht a user needs for manipulatingt data.
6. The navigation Pane has been removed. .
7. Shortcut Keys ( hot keys) are the underlined letters in the words next to each command button option, allow users to select an option by pressing and holding dow the Alt key while typing the underlined letter.
8. Text boxes and pictures can be used to provide identification and visual appeal.
8a. A switchboard lets you customize the organization of the user interface so you can make it easier for user to access commonly used objects and prevents users from changing the design of tales, forms, queries, reports, and other objects.
9. A custom dialog box is a form that resembles a dialog box, both in appearance and function.
10. A command button is a control on a form that starts an action when you click it.
11. A macro is a command or a series of commands that you want access to perform automatically for you.|
|11a. Visual Basic for Applications (VBA) also lets you automate task.
12. An action/event is an instruction to Access to perform an operation, such as opening a form and is a state, condition or occurrence detectable by access.


Beep Produces a beep tone through the computrs speakers.
Close Closes the specified window, or the active window if none is specified
FindRecord finds the record that meet the criteria


Maximizes the active window
MsgBox Displays a message box containing a warning or informaional message
Openform Opens a form in datasheet, design, form or print priview.
Quit Exits Microsoft Access
Restore Restores window to previous size
RunMacro Runs a macro
SendKeys Sends keystrokes to Access or another active program

13. Access lets you automate most tasks using either macros or Visual Basic for Applications.
14. Macro window is where you create and modify macros.
15. Action column is were you enter the actions you want access to perform.
16. comment column you enter optional comments to document the specific actions.
17. Arguments column displays the argument settings for the action.
18. Single stepping executes a macro one acton at a time.
19. Actions can be added by dragging and dropping.
20. Event property specifies how an object responds when an event occurs.
21. Event procedure occurs when the event executes code.
22. A macro group is a macro that contains other macros.
23. Macro name column lets you distinguish individual maros in a macro group.
23a. Create a Macro - click create tab on ribbon, click macro button in the other group, click the save button an the quick access toolbar, type the macro name, press enter.
24. View argument specifies the window view in which to open the object.
25. Filter name argument specifies the name of a query or filer that will be used.
26. Where condition argument specifies an expression or SQL statement that will used to select records.
27. Data Mode argument specifies the forms data-entry options.
28. Windows mode argument specifies the forms window characteristics.
27. A list box is a control that displays a list of values.

Adding Actions by Dragging


Object Dragged Action Created Arguments and Their Default Values
Table Open Table View: Datasheet
Data Mode: Edit
Query Open Query View: datasheet
Data Mode: Edit
Form Open Form View: form
Filter Name: none
Where condition: none
Data Mode: ;none
Windows Mode: ;normal
Report Open Report View: Print
Filter Name: none
Where condition: none
Window Mode: Normal

28. Structured Query Language (SQL) is a standard language used in querying, updating, and managing relational databases.
29. Select statement is used to define what data it retrieves from a database.
30. Select-from-where-orderby is the basic SQL code.
31. After Select list the fields you want to display.
32. After From list the table used
33. After Where list the selection criteria
34. After Order by list the sort field, DESC indicates descending order.
35. semi colon (;) is the ending character of a SQL program.
36. System tables are special tables maintained by Access that store information about the characteristics of the database.
37. MSysObjects table keeps track of the name, types, and other characteristics of every object in a database.
38. Left function provides the first character(s) in a text string.
39. The switchboard manage is a tool that helps you create and customize a switchboard(menu).
40. Switchboard items is a table that contains records describing the command buttons on the switchboard.
41. Default page or Main page is the switchboard page that will appear when you open the switchboard.

Best Practices

Best Practice: