- •Context
- •Introduction
- •1 Creating and working with a database in ms access 2003
- •1.1 Introduction to Databases
- •1.2 Planning a Database
- •1.3 Starting Access and Opening a Database
- •1.4 Self-control test
- •2 Creating a table in ms access 2003
- •2.1 Theoretical material
- •2.2 Example of tables creation for database “Product realization of Holding company “Group nord”
- •2.3. Self-control test
- •3 Creating queries in ms access 2003
- •3.1 Theoretical material
- •3.2 Example of queries creation for database “Product realization of Holding company “Group nord”
- •3.3. Self-control test
- •4 Creating forms in ms access 2003
- •4.1 Theoretical material
- •4.2 Example of forms creation for database “Product realization of Holding company “Group nord”
- •4.3. Self-control test
- •5 Creating reports in ms access 2003
- •5.1 Theoretical material
- •5.2 Example of reports creation for database “Product realization of Holding company “Group nord”
- •5.3. Self-control test
- •Individual tasks
- •Variant 1
- •Information about passengers
- •Variant 2
- •Variant 3
- •Variant 4
- •Variant 5
- •Variant 6
- •Variant 7
- •Variant 8
- •Variant 9
- •Variant 10
- •Variant 11
- •Vehicles
- •Variant 12
- •Variant 13
- •Variant 14
- •Information about printing-house
- •Variant 15
- •Variant 16
- •Literature
4.2 Example of forms creation for database “Product realization of Holding company “Group nord”
4.2.1 Create form by using Wizard
Create a form to edit data on table “Catalog of products”. Press “Create form by using wizard”.
1.
Anytime you create a form, you have to tell Access which table or
query you want to use for your form (select table “Catalog of
products”). Tell the Wizard which fields you want to display on the
form (Model, Characteristic, Product_group_ID, Price). To add a
field, double-click the field or select the field and click the
button. Click the
button to add all the fields to your form.
Figure 4.2 – The first step of form Wizard
2. Next the Form Wizard asks how you want to display the data on the form: columnar, tabular, datasheet, justified, pivot table, pivot chart.
3. Choose the color styles that you will use in your form (Industrial).
4. Give your form a name (“Catalog of products”). Click Finish
After a few moments, your new form appears on screen, as shown in figure. You don't have to worry about saving your new form the Form Wizard does this for you automatically as part of the form creation process.
Figure 4.3 – A form build by using Wizard
Use the form's record navigation buttons to browse through the records in the underlying “Catalog of products” table. Close the form when you're finished.
4.2.2 Create form in design view
Create a form to edit data in table “Catalog of customers”. Press New button in the Form menu. In the window select Design view and choose the table or query where the object’s data comes from.
Figure 4.3 – Choosing table to create a new form in Design view mode
The Form design window will appear. The area consists of three sections:
The Form Header, here we put what we wish to appear at the beginning of the form.
The Detail section, here the source records of the form appear, either various records or one per screen, depending on the type of form. Even though various records are visualized on one screen, we need to indicate the design corresponding to just one record in the Detail section.
The Footer section, here we need to put what we want to appear at the end of the form.
Using the View menu, and then the option Form header/Footer option we can close or open the header and footer. The mark to the left of the option indicates to us whether the sections are open or closed, if we remove the sections we lose all the controls associated with them. To open them we just need to select the option again.
In the field list box we can see all fields of the “Catalog of customers” table. This fields can be placed on the form. Buttons on the toolbox are used to add multiple items to the design grid.
Drag items on the field list (Customer, Legal address, Phone, Account number) to the form.
Access will create a Label and Text box to represent each field.
Text box: A graphical control that links your form to a record source.
Label: Displays descriptive text such as titles, captions or instructions.
Select all controls on your form with the pointer and apply different fonts, font sizes, highlights, font colors, bold, italics, underlines, etc. to it.
Turn Form Headers on under View Form Header/Footer.
With
the help of
(Label) button on the toolbox create title of the form “Customers”.
Click the
button located on the Toolbox, draw an area with the cursor in the
Form
Header
section by clicking and drawing. Format the title as shown in figure.
In
the Footer create field for current date with the help of
(Text box) button and name of accountable
person
(Label) button.
The
Detail area format with picture using
(Picture) button. Select a file with image. To change properties of
the picture click on the image with the right mouse button, from the
menu that appears select Properties. Set the next:
Size mode – Zoom
Picture aligment – Center
Change form’s properties (right-click on the form).
Set values of the next properties:
Scroll Bars – Neither
Record Selectors – No
Dividing Lines – No
View form on the Form view.
4.2.3 Create main form in design view
With the help of this form we will navigate through the database, open other forms. Press Create form in design view from the menu.
Turn Form Headers on under View Form Header/Footer.
With the help of (Label) button on the toolbox create title of the form “Holding company “Group NORD””.
Change form’s properties (right-click on the form):
Scroll Bars |
Neither |
Record Selectors – |
No |
Navigation buttons |
No |
Dividing Lines – No |
No |
Picture |
[full name] |
Picture type |
Clip |
Picture alignment |
Center |
With
the help of
button
on the toolbox create Command button on the form (make sure the
Control
button is down) that will be used to open “Catalog of products”
form.
When the Command Button Wizard starts, in the first page, in the Categories list, click Form Operations. In the Actions section, click Open Form. Click Next.
In the second page of the wizard, select a form we want to open . Click Next.
In the next step set “Open the form and show all the records”. Click Next.
Change the content of the top text box to Open or choose the picture. Click Next.
Change the name of the button to cmdOpen1. Click Finish.
The same way create Command button to open “Catalog of customers” form.
Create the Command button to exit from application. In the Command Button Wizard choose the category of action Application, then in the Actions section, click Quit Application. Choose the picture. Click Finish.
Set a picture that you will use in your form. Open properties window in the context menu. Set the next:
In the result is the form:
Save a form with name «The main».
To
automatically start up this form when we database is opened we need
to reconfigure the settings in your Startup options:
ToolsStartup...Display
Form/Page: The main.
