Creating push-button forms: Guidelines for performing laboratory work. Creating a main button form for an Access database Creating a main button form in access

Creating a Button Form

When you open the database, the Database “Products” form should appear on the screen ( Title page) of the following type (Fig. 1.).

Rice.

By clicking the Exit button, the database should be closed.

When you click on the Database button, the Main push-button form should be displayed on the screen, the buttons of which open second-level forms (Fig. 2).

Rice.

Operating procedure:

  • 1. Creating the structure of the main button form begins with button forms of the second level: Tables, Forms, Queries, Reports. Let's look at this process using the Table form as an example.
  • 1.1. On the Create tab, in the Forms section, click the Blank Form button. A form will appear on the screen. not associated with any table. The form opens in Design mode (Fig. 3).

Rice.

1.2. On the Design tab, in the Tools section, click the Property Page button. In the properties window, on the Layout tab, in the Signature line, write the name of the form (Fig. 6.4).

Rice.

  • 1.3. The Selection Area and Navigation Buttons are removed from the form (these parameters are configured on the Layout tab of the Properties Window).
  • 1.4. On the Design tab, in the Controls section, all objects are displayed and the Use Wizard button is disabled (made inactive) (Fig. 5).

Rice.

1.5. Buttons are “drawn” on the form; when clicked, tables will open. The number of buttons should match the number of database tables plus a button to close the form and return to the main menu (Fig. 6).

Rice.

  • 1.6. For each button, a command is written that will open the corresponding table.
  • 1.6.1. To do this, select the button and on the Design tab, in the Tools section, select Property Page.
  • 1.6.2. In the dialog box that appears, go to the Events tab and place the cursor in the Button Press line.
  • 1.6.3. A button will be displayed on the right side of the line; when you click on it, the Builder dialog box will appear on the screen, where you select the Macros command and click the OK button.
  • 1.6.4. A window designed for recording macro commands will appear on the screen (Fig. 7).

Rice.

1.6.6. In the Add new macro command line, select the OpenTable command. In the Macro Arguments section, select the name of the table to open and the opening mode from the drop-down list.


Rice. 6.8. Selecting a table name and opening mode

  • 1.6. The macro recorder window closes. To check how the macro works, you need to switch from Design mode to Forms mode and click on the created button. The corresponding table should appear on the screen.
  • 1.6.8. Similar commands are written for the remaining buttons with the only difference that in the Table Name line the name of another table will be indicated - Product Directory, Invoice Directory or Goods Receipt.
  • 1. Record a macro for the button Go to the main button form, which will allow you to close the Table form and open the Main Menu form.

To do this, you need to write down the following sequence of commands in the macro recorder window (Fig. 9).


Rice.

1.8. In a similar way, the forms “FORMS”, “QUESTS”, “REPORTS” are created, containing the corresponding buttons (Fig. 6.2).

In this case, all forms should be opened in Forms mode, reports in View mode, and queries in Design mode.

  • 2. The first level form, the Main button form, is created.
  • 2.1. On the Create tab, in the Forms section, click the Blank Form button. A form will appear on the screen that is not associated with any table. The form opens in Design mode (Fig. 10).

Rice.

2.2. On the Design tab, in the Tools section, click the Property Page button. In the properties window, on the Layout tab, in the Signature line, write the name of the form (Fig. 11).


Rice.

  • 2.3. The Selection Area and Navigation Buttons are removed from the form (these parameters are configured on the Layout tab).
  • 2.4. On the Design tab, in the Controls section, all objects are displayed and the Use Wizard button is disabled (made inactive) (Fig. 12).

Rice.

  • 2.5. Buttons are drawn on the form, clicking on which will open second-level forms: Tables, Forms, Queries, Reports, as well as a button to go to the title page of the “Products” Database (Fig. 13).
  • 2.6. For each button, a macro is created containing commands that must be executed when the button is pressed (Fig. 14, 15).

Rice.

Rice.

  • a) macro command for the Open TABLE form button;
  • b) macro command for the button Open form FORMS;
  • c) macro command for the button Open the REQUESTS form;
  • d) macro command for the button Open the REPORTS form
  • 3. Creating the Title Page form.
  • 3.1. On the Create tab, in the Forms section, click the Blank Form button. A form will appear on the screen that is not associated with any table. The form opens in Design mode.
  • 3.2. On the Design tab, in the Tools section, click the Property Page button. In the properties window, on the Layout tab, in the Signature line, write the name of the form (Fig. 16).

Rice.

  • 3.3. The Selection Area and Navigation Buttons are removed from the form (these parameters are configured on the Layout tab).
  • 3.4. On the Design tab, in the Controls section, all objects are displayed and the Wizard button is disabled (made inactive) (Fig. 17).

Rice.

3.5. A Tab () is drawn on the form (Fig. 18).

Rice.

3.6. Tab labels contain their names. To do this, select the required tab, call up its context menu, select the Properties command and change the Signature property (Fig. 19).


Rice.

3. Formalized " Home page» Database “Products” form (Fig. 20).

Rice.

Note: if the dimensions of the photo exceed the dimensions of the frame, then you need to open the Properties window for the picture and in the Set dimensions line, select the Fit to frame command.

3.8. The “Initial Information” page is created (Fig. 21).

Rice.

3.9. In the note of the Title Page form, two buttons are created, designed to close the database and to go to the main button form (Fig. 22).

Rice.

  • 3.10. For each button, a macro is created with the corresponding commands (Fig. 23).
  • a) for the Database button:

b) for the Exit button:


Rice.

3.11. On the Main push-button form, a button is created, clicking on which will open the Database “Products” form and close the Main push-button form (Fig. 24, 25).

Rice.

Rice.

3.12. Set so that when you open the database, the “Products” Database form automatically appears on the screen. To do this, select the File tab, Options command, Current Database section and in the View Form line select the name of the form Database “Products” (Fig. 26).


Rice.

push-button interface signature

Bibliography

  • 1. Fomina E.E. Guidelines for implementation course work on the discipline “Informatics” [Electronic resource]: methodological manual / E.E. Fomina. Tver, 2009. 102 p.
  • 2. Mamontova E.A., Tsvetkova O.N., Grigoriev S.M. Working with databases in MS Access 2010: guidelines and assignments for studying the course “Informatics”, “Economic Informatics” / E.A. Mamontova, O.N. Tsvetkova, S.M. Grigoriev. Moscow, 2012. 75 p.
  • 3. Vinogradov G.P., Kirsanova N.V. Designing the structure of relational databases using MS Access DBMS: tutorial/ G.P. Vinogradov, N.V. Kirsanova. Tver: TSTU, 2006. 84 p.

Laboratory work

Computer science, cybernetics and programming

Create a main button form that allows you to open the following button forms from it by clicking on the buttons: List of forms List of reports List of tables List of queries and the last item Exit Each button form must contain a list of buttons for opening ALL corresponding database objects. Forms should contain a meaningful title, a background image, and a list of buttons with captions. Creating the Main Button Form To create the main button form in ccess, there is a special utility program, Button Form Manager....

c) Parshikov P.A.

Laboratory work No. 9

Laboratory work is carried out according to the chosen topic of the course work!!!.

Create main button form, allowing you to open from it by pressing the buttons, the following button forms:

  • List of forms
  • List of reports
  • List of tables
  • List of requests

and the last item Exit

Each button form must contain a list of buttons to openALL relevant objectsDatabase. Form “List of Forms” - buttons for opening all forms , “List of reports” form - buttons for opening all reports , “List of tables” form - buttons for opening all tables , form “List of requests” buttons to openall fetch requestsetc. In forms with a list of objects, the last item should be the “Back” item, which transitions tomain button form.

Forms must containmeaningful header, background image, list of buttons with captions.

Brief theory

The concept of "Main button form"

It is a user-created form with buttons that allows you to access previously created database objects from a single window. Basically, a button form is used as the main menu of an application.

Creating the “Main Button Form”

To create the main button form in Access there is a special utility programButton Form Manager. To open the manager, open the database and on the tab in the menuWorking with databases press the button Button Form Manager.

If the button form was not in the database before, you will be prompted to confirm the creation of the button form, click the button Yes .

After this, in the database in the list of forms will appear Button form and in the list of tables Switchboard Items. DO NOT touch the table Under no circumstances should you delete or modify it. Form IT IS FORBIDDEN delete and edit with GREAT caution.

After an affirmative answer to creating a button form, a window will openButton form manager, on the list Button Pageswhich has only one button formMain button form.

Fig.1. Button Form Manager

This list can only contain button forms. By clicking on the appropriate buttons you can create, edit and delete forms. Using the button Create you need to add new button forms subordinate to the main one: List of forms, List of reports, List of tables, List of queries. At the click of a button Create window opens Creation , in which you need to specify the name of the button form to be created.

Fig.2. Create window

After adding all the button forms in the listButton Pagesthere should be five forms:

Fig.3. List of added button forms

After this, you need to move on to editing the created button forms and adding buttons to them. Let's start editing withMain button form. To do this, select it in the list and click on the button Change .

Fig.4. Edit Button Page Window

The “Edit button form page” window opens, in the upper part of which the name of the button form is indicated, and below is a listElements of this button form. These elements represent the buttons that will be placed on the button form. Using buttonsCreate, Edit and Delete, you can edit the list of buttons on the button form.

The main button form, according to the task, should contain buttons for opening created button forms and the last item Exit . To do this, click on the button Create, a window will open.

Fig.5. Edit Button Element Window

Let's create the first button to open the button form List of forms . We indicate the text that will be next to the button, the command and select the desired button form from the list.

Fig.6. Setting parameters for a button form element

Similarly, buttons are created to open the remaining three button forms with a list of database elements. For button Exit you need to specify the commandQuit the application.

Fig.7. Options for the Exit button

As a result, the structureMain button form will take the form:

Fig.8. The final structure of the main button form

To edit or remove any of the created buttons, select its name in the listand press the button Change or Delete . If you need to change the order of button form elements, select the element in the list and use the buttons Up or Down.

When you've finished creating your button form, click the button Close.

After constructionMain button formLet's move on to editing the forms opened from it, they are empty for now. For this purpose inButton Form Managerselect a form from the list List of forms and click on Edit.

Fig.9. Changing the form List of forms

You need to add buttons to subforms to open the corresponding objects. In the form List of forms buttons to open ALL forms from your database. Let's fill out the listElements of this button form. To do this, click on the button Create and move on to specifying the parameters of the first button. In the window you must indicate that the button will be labeledForm of enterprise, team Open the form for modification, in the list form Form for entering enterprises.

Fig. 10. Creating a button to open a form

This creates the first button to openForms for entering enterprises. Buttons for opening all other forms are created in the same way. Last button Back should provide a transition toMain button form.

Fig. 11. Creating a Back Button

As a result, we get the structure of the form List of forms , containing a list of buttons for opening forms.

Fig. 12. Form structure List of forms

Click the Close button and move on to editing the form structure List of reports . Add buttons to this form to open reports. In the windowChanging a button form elementspecify the text for the first buttonOpen the report “List of enterprises» command Open report and in the drop-down list we find the reportReport "List of enterprises".

Fig. 13. Creating a button to open a report

Similarly, we create buttons for opening other reports that are in your database. The last thing to do is add a button to the button form again. Back:

Fig. 14. Creating a Back Button

As a result, we get a form with a list of buttons for opening reports and a button to return to the main button form:

Fig. 15. Completed form List of reports

Before you move on to editing the form with a list of tables and queries, you need to study the macros that are used to open tables and queries from button forms.

Macro concept

Macro is an Access object , which, along with other objects, is presented in the database window. A macro consists of a sequence of macro commands. Macro command this is an instruction focused on performing a specific action. Using a macro command, you can open a form, report, print a report, run a query, apply a filter, assign a value, create a custom menu or command bar. The set of macro commands available in Access implements almost any action that is necessary when developing small personal user applications.

We will create macros designed to open tables and queries. These macros will consist of one macro command.

Creating Macros

To start creating a macro in the database window, select on the tab Create Click Macro Button . The macro window will open (Fig. 15).

Fig. 15. Creating a Macro

Macros , making up the macro, are entered into the column Macro command . To enter a macro command, click the button to expand the list of macro commands in this column and select OpenTable to open the table. Table name"Enterprises" select from the list in the sectionMacro Argumentsat the bottom of the macro window (Fig. 16).

Fig. 16. Adding Macros

The following macro commands are possible:

OpenTable opens the table. The name of the table and its opening mode are specified by the arguments of the macro.

OpenRequest opens a request. The name of the request and the mode of its opening are specified by the arguments of the macro.

Once a macro command has been entered, the macro can be saved with a name, for example,Macros for opening are created in the same way ALL five tables you created in your database.

After this, you can proceed to creating a macro to open a request. In this case, you need to select a macro command OpenRequest. The request name is selected in the corresponding list, the opening mode is left as is, do not change. Macro for opening a request The average age is:

Fig. 17. Editing a macro to open a request

As a result, macros for opening ALL tables and ALL SELECT queries should appear in the list of macros.

Fig. 18. List of macros

After creating macros, you can start editing button forms again. OpensButton Form Managerand start editing the form List of tables . We add buttons to it to open all database tables. To do this, in the window for adding a button to create the first one, specify the textOpen the “Enterprises” table,select from the list of commandsRun macro, and in the list of macros selectMacro for opening the Enterprise table.

Fig. 19. Creating a button to open a table

Similarly, adds buttons for opening other tables and the last button Back to return to the main button form.

Fig.20. List of added buttons to the form List of tables

After that we go to the windowButton form managerand start changing shapeList of requests.In this form we add buttons for opening requests. For the first button, specify the textOpen request Average age, team Run macro, and macro Macro for opening the query Average age.Similarly, we add buttons to open ALL selection requests and at the end we create a button Back .

Fig.21. Editing the Request List form

Thus, all button forms are completed and can be closedButton Form Manager. You can launch a button form from the list of forms by openingPush-button form.

Fig.22. Built button form

Now you need to edit this form in the designer, remove unnecessary color panels, add a meaningful title and select the item from the toolbar Drawing , stretch the drawing on the form and in the window that opens, select the drawing you found for the subject area (in our case, this is a drawing with an enterprise).

In order for the buttons to be located above the picture, you need to select the picture with the mouse, and then in the menu Format select Send to back. The buttons can be placed closer to the upper left corner, the buttons DO NOT DELETE. The resulting button form allows you to conveniently access any objects of the created database.

Fig.23. Created button form

Output of the "Main Button Form" when opening the database

The last step is to specify that the button form should be launched when the database is opened.

  1. In the Tools menu select teamLaunch parameters.
  2. In the dropdown listForm/page outputselect from the dropdown list Button form.
  3. In the window you can also specify additional application parameters: title, icon, etc.

The button form we created will open when you open your database.

PAGE 2


As well as other works that may interest you

51775. The lesson is the main form of playing sports games at school 116.5 KB
Lesson duration ranges from 30 45 minutes to three or more hours. The lesson plan involves dividing it into several interconnected parts in which various tasks are solved. The duration of the parts depends on the total duration of the lesson, the preparedness of the students, the conditions of the lesson, etc. The preparatory part aims to organize and prepare the students to perform the main task of the lesson.
51777. Development of Ukrainian language 59.5 KB
Meta: become aware of the historical stages of the development of the Ukrainian language; with the trends in the development of the Ukrainian language and vocabulary in our days; instill patriotism in the Ukrainian language as a sovereign and motherly love; develop respect for logical, imaginative thinking, improve skills, work with a helper, and refine the vocabulary of students. Science confirms that over the course of a decade, the vocabulary of the language changes by about 25. From the turn of marriage to national traditions...
51780. A comprehensive description of the development of culture and literature of the 19th century, the stylistic development of literature. Realism as directly in secular literature 2.76 MB
Lesson type: combinations. Guy de Maupassant HIDE LESSON I. Guy de Maupassant: Please me; comfort me; let me die; rozchulte me; let me shudder; let me cry; give me a reason for thinking about the beast before the end of the lesson. Stunned by the topics in lesson IV.
51781. TURNINGS TO JAZZ 530 KB
Jackson points out how pop music plays an important role in people’s lives; explain to students the meaning of understanding the spirituality of blues jazz improvisation;. develop vocal choral skills of zokrem, skills of cantilena singing in accordance with the rhythm of hearing; develop interest in creativity of Russian pop stars; feel the aesthetic taste of learning; develop students' interest in light music and jazz FORMATION OF COMPETENCIES: CREATIVE MUSICAL LIVING MUSICAL...
51782. Current school graduate – special features have been formed 36 KB
The current school graduate has formed the speciality of the teaching profession and human knowledge, which has a constant and uninterrupted penetration into the complex spiritual world of people. The main characterological guidelines for a graduate’s specialness are unique. This particularity has a high level of self-awareness and self-discipline. So much so that he respects himself and is aware of his value and the value of other specialness is meant to bear responsibility before oneself and to be of service. Humane specialness shows mercy, kindness, giving to...

Button form is a form whose sole purpose is to redirect you to other forms (usually when you click a form button). It is a kind of main menu of your database. This form is both the starting point and the center of action. A typical push-button form contains a set of buttons that direct different places.

In Fig. 14.10 shows a type of button form created by Access.

Note

The created button form is similar to any other type of form, so once you create it, you can use the skills you learned in the last two chapters to make your button form look visually appealing.

Rice. 14.10. This Access button form gives you access to five different forms with one click. The advantage of Access button forms is that you can build your own in a matter of seconds. Disadvantages include somewhat old-fashioned appearance, forcing impressionable users to design their own button forms from scratch

To automatically create a button form, you should use the Form wizard. The following describes how it works.

1. Select from the ribbon Working with Databases > Working with Databases > Button Form Manager(Database Tools > Database Tools > Switchboard Manager).

When you click this button in the database for the first time, Access will report that it cannot find the button form and will offer to create it. Click the Yes button to continue working with the Button Form Manager (Figure 14.11).

If a button form already exists, go to step 2, where you can edit the current button form.

Rice. 14.11. The button form manager displays a list of pages. Each page is a separate part of a button-shaped menu. The simplest button forms have only one page, which means the form supports one level of depth and each button performs a useful action (for example, opening a form or report)

Rice. 14.12. The window allows you to create menu commands, delete those that are no longer needed, change their order (this order determines the order of commands on the button form)

2. Click the button Change to edit a button form page.

A window appears on the screen Changing a button form page(Fig. 14.12). This is where the actual menu commands are defined.

3. To create a new menu command, click the button Create.

A window appears on the screen Changing a button form element(Fig. 14.13). To create a menu command, you need to provide two pieces of information: the text that appears on the form, and the command that Access should execute when you click the button.

Rice. 14.13. This command runs the report Attendance(attendance).

From the dropdown list Team select the action the command should perform

4. Enter menu text and then select the action you want the button to perform.
The following options are possible:

o Go to button form(Go to Switchboard) - goes to another page of the button form. Button pages can be used to break up really long menus into several shorter ones:

o Open form to add(Open Form in Add Mode) - opens the form in data entry mode, so you can insert new records;

o Open form for modification(Open Form in Edit Mode) - opens the form in normal mode to view and edit records. This mode does not allow form editing, despite the misleading name;

o Open report(Open Report) - opens the report in preview mode;

o Application designer(Design Application) - opens the Button Manager window, thus allowing you to edit the button form menu. This option rarely needs to be included on the menu;

o Quit the application(Exit Application) - ends the Access program:

o Run macro(Run Macro) and Execute the program(Run Code) - run the macro you created (see chapter 15) or the code you wrote on Visual language Basic (see chapter 16).

5. Repeat steps 3 and 4 until you have created all the necessary commands. Then click the button Close to return to the main window of the Button Form Manager.

Pushbutton forms have a nasty secret. You can only put eight menu commands on each page. If you need more (and who doesn't?), you should add additional pages to your menu.

The main button form is created for the purpose of navigating through the database, i.e. it can be used as the main menu of the database. The elements of the main button form are form and report objects.

Queries and tables are not elements of the main button form. Therefore, you can use macros to create Query or Table buttons on a button form. First, macros “Open Query” or “Open Table” with unique names are created in the database window, and then buttons for calling these macros are created in button form.

You can create several button forms for one database. Buttons should be grouped on button form pages in such a way that it is clear to the user in which button forms certain commands can be executed (queries, reports, data entry and editing). It should be noted that subordinate button forms must have return buttons to the main button form.

The technology for creating button forms is as follows:

1) create a main button form (GKF) page;

2) create the required number of pages of subordinate push-button forms (for example, forms for data entry, for reports, for requests, etc.);

3) create elements of the main button form;

4) create elements for push-button report forms and forms for entering or changing data;

5) create macros for queries or for tables with unique names;

6) create elements for push-button query forms or tables.

The structure of button forms can be presented as follows.

To create the main button form and its elements, you need to open the database (for example, “Student Performance”) and execute the command Access Options - Settings - Select commands from / “Working with Databases” tab – select Button Form Manager and add it to the Quick Launch Toolbar Settings.

If the button form has not been created previously, a dialog box will open "Button Form Manager"

in which you need to click the “Yes” button, thereby confirming the creation of the button form. As a result, the Main Button Form page will be created.

Next, you can create three more button form pages: Data Entry Forms, Reports and Queries. To do this, click on the “Create” button and enter a name in the window that appears new page"Data entry forms"

and click on the “OK” button. The “Data Entry Forms” button form page will be created. In a similar way, you need to create two more pages, in the end we get four pages of push-button forms, which are displayed in the “Push Button Forms Manager” window.

After this, we create GCF elements; to do this, in the “Push Button Form Manager Window”, select the “Main Push Button Form” page and click “Change”, a new window “Changing Push Button Form Pages” will open.

In this window, click on the “Create” button, a new window “Changing a button form element” will open.

in which we do the following:

 enter the text: Forms for data entry;

 select the command from the drop-down list: Go to button form;

 select a push-button form from the list: Entering data into forms, click on the “OK” button.

The “Edit Pushbutton Form Page” window displays the “Data Entry Forms” button form element.

Using a similar method, you need to create the elements: “Queries” and “Reports”, and then the element (button) “Exit DB”.

As a result, all elements of the main button form will be displayed in the “Edit Button Form Page” window.

The button form appears in the list in the database window area on the Forms tab in the Objects panel, and the Switchboard Items table appears in the lists on the Tables tab. Double-clicking on the "Pushbutton Form" text will open the Main Pushbutton Form.

In order for this form to be displayed when starting the database, you must run the Access Options/Current Database command, in the View Form window, select “Push Button Form” from the drop-down list, and uncheck the Status Bar checkbox. You can also enter a title and icon for the application.

At this point, the creation of push-button forms is not yet complete, since there are no elements on the subordinate push-button forms (Data Entry Forms, Reports, Queries).

Creating Sub-Push Button Forms: Reports and Forms

To create push-button form elements "Data Entry Forms", you must launch the database (for example, "Student Progress" with the main push-button form) and execute the command Tools / Utilities / Push-button Form Manager.

The Button Form Manager window will open. Then you need to select “Data Entry Forms” in the “Push Button Forms Manager” window

and click on the Change button, the “Change button form page” dialog box will open.

in which we perform:

 enter the text: Students;

 select the command from the drop-down list: Open form for editing;

 select a button form from the list: Students, click on the “OK” button.

The "Edit Button Form Page" window displays the "Students" element. After creating the “Student Groups” element using the same technology, it will also be displayed in the window.

Next, you need to create a button to return to the main push-button form, to do this, click on the “Create” button and in the window that appears, select the command “Go to push-button form”, select “Main push-button form” and enter “Go to main push-button form”. Click on the “OK” button

and close the “Change button form page” window.

Let's launch the main button form in the database window, in which we click on the "Data Entry Forms" button, the "Data Entry Forms" will open.

The creation of elements for the “Reports” button form is carried out using the same technology, and the result will be:

Creating a Sub-ButtonForm: Queries

To create elements of the subbutton form "Queries", you need to run the database (for example, "Students' progress" with the main button form) and create macros "Open Query" or "Open Table" with unique names, and then create buttons in the button form to call these macros.

When creating a macro "Student Performance" you need to select the "Macros" tab and click on the "Create" icon, the "Macro" dialog box will open. In this window, select the "Open Query" macro action from the drop-down list and select the query name "Student Progress" from the drop-down list.

then click on the "Close" button. In the window that appears, "Save changes to the layout or structure of the Macro1 object?" Click on the "Yes" button. The “Save” window will open, in which you need to specify the name of the macro “Student Progress” and click on the “OK” button.

The macro name will be saved in the list of macros in the DB window. After creating and saving the "Parametric_query" macro, the names of the created macros will be displayed in the database window.

To create button form elements for the “Student Progress” request, you must execute the command Service / Utilities / Button Form Manager. The Button Form Manager will open.

Then you need to select “Queries” in the “Pushbutton Form Manager” window and click on the Edit button, the “Edit Pushbutton Form Page” dialog box will open.

In this window, click on the “Create” button, a new window “Changing a button form page” will open.

in which we perform:

 enter the text: Report: Student performance;

 select the command from the drop-down list: Run macro;

 select the button form from the list: Student Progress, click on the “OK” button.

The “Edit Button Form Page” window will display the “Report: Student Progress” button form element. After creating the “Parametric_query” element using the same technology, it will also be displayed in the window.

Next, close the “Change button form page” and “Push button form manager” windows. In the DB window, on the “Forms” tab, click on the “Push Button Form” inscription, and the Main Push Button Form will open. In the Main button form, click on the Requests button, and the “Requests” button form will open.

Thus, a button form "Requests" has been created, which is a subordinate button form.

Laboratory work No. 5.

Subject: Creating button forms.

Target: Learn to create and edit button forms.

Exercise

Create a main button form and additional button forms for working with the database.

Basic information

SuperstructureAccessbutton form manager

Access add-ins are databases that contain procedures and their associated objects. There are three types of add-ons:

menu add-ons

· builders

· masters

Wizards and builders are context-sensitive add-ins. They are triggered when the user tries to perform certain actions. Menu add-ons are context-independent and can be accessed from the menu ServiceÞ Utilities. An example of a menu add-in is the Button Form Manager.

Pushbutton forms (or menus) ) are forms in an application that provide access to application components and subsystems. Switching between components occurs by clicking buttons. Of course, you can build button forms in design mode by creating an event handling procedure for each button Button press. But in the case where the application includes many forms and reports, this work can be very time-consuming.

Button Form Manager uses a sophisticated technique to control all button forms through one button form, creates a driver table called Button Form Elements, and allows you to create up to eight elements in each button form. If more than eight buttons are required, then the missing ones are created manually by writing procedures or creating macros. When it starts, the dispatcher looks for a table in the current database with the name SwitchboardItems, and if there is none, it starts creating a new button form.

In the dialog box Button Form Manager all forms are called pages. Here the names of all button forms of the application are specified.

In the dialog box you can change the names of forms, edit form elements (button Change...), delete elements (button Delete) or change the position of an element (button Up And Down).

In the dialog box Changing a button form element three parameters are specified:

· Text– the name of the element that will appear on the button in the button form.

· Team– the command that will be executed when the user clicks the button.

· Form– the contents of this field depend on the value of the Command field.


Rice. 5.1 . Creating a button to add a new client.

After creating the button forms, a table will appear on the Tables tab of the database window SwitchboardItems, and on the Forms tab – form Switchboard, which can be renamed. But to rename the table SwitchboardItems, you need to change all references to it in the VBA (Visual Basic for Applications) procedures stored with this button form.

Work technology

Ccreating a button form

1. Open the database.

2. Select a team Service® Utilities® Button Form Manager.



Fig.5.2 Button form Forms .

3. When asked about creating a new button form, answer Yes.

4. In the window that appears Button Form Manager click the button Create.

5. Set the name of the additional button form – Forms. Click OK.

6. Set the name in the same way Reports for the second additional button form and names Form Client And Form Orders,Report ReportClients, Account And Exit for others.

7. In the window Button Form Manager select MainSwitchboard(Main button form) and click the button Change.

8. In the window Changing a button form page click the button Create.

9. In the window Changing a button form element specify the parameters:

Text: Forms

Team: Go to button form

Form: Forms

10. Click OK.

11. Button options Reports set in the same way.

12. For the button Exit set parameters:

Text: Exit

Team: Quit the application

13. Press the button Close.

14. In the window Button Form Manager select form Forms and press the button Change.

15. In the window Changing a button form page click the button Create.

16. In the window, specify the parameters:

Text: Working with the Client form

Team: Go to button form

Shape: Shape Client

17. Click OK.

18. In the same way, specify the parameters for working with ShapeOrders

19. Provide a button to return to the Main form:

Text: Return

Team: Go to button form

Form: Main Switchboard.

20. Click Close.

21. In the window Button Form Manager choose a form Form A Client and press the button Change.

22. In the window Changing a button form page press the button Create.

23. In the window Changing a button form element specify parameters:

Text: New client

Team: Opening a form in append mode

Form: Client

24. Click OK.

25. In the window Changing a button form page press the button again Create.

26. In the window Changing a button form element specify the parameters:

Text: Editing

Team: Opening a form in edit mode

Form: Client

27. Click OK.

28. Similar to steps 21-27, create buttons for working with the form Orders

29. Similar to step 19, create a button to return to the previous form.

30. In the window Button Form Manager select form Reports, press the button Change and create button form elements Reports(view reports and return).

31. Edit the ButtonForm in design mode.

1. Theme laboratory work.

2. Purpose of laboratory work.

3. Technology for creating a push-button form.