Sie sind auf Seite 1von 5

System Maintenance

System Overview

This is a bespoke system which has been made to a specific user requirement. The
system has been made using Microsoft Access along with VBA for a lot of the
procedures that are going to be used for the functions. The basic structure of the
system has been made into tables. These tables are based on unique entities which
include products and customers. The tables have been linked using common fields
like customer ID and Order ID. These ID’s have been made using the Access
software and provide a uniqueness for each record which is made. For presentation
and user friendly reasons I have used forms to make screen views for the user. This
makes the system easier to use and it allows a wider range of people to use the
system in a quicker time.

The system has been made with up most security so only authorised people can
access the system. Using the combined power of VBA and access a security system
has been setup where a global password function is used for all passwords. If the
correct password is not entered then access to the system when opened is not
allowed. This makes the system secure from outside threats like hackers.
The system has many features and functions which have been made to facilitate the
users need. Analysing the business can also be done on the system through a utility
screen. Here many button links are present which each go to an individual report.

Most of these reports are made using processed data from queries. These queries
have been made using Microsoft Access and allow for all of the processing to be
done. Some queries do not require any additional variables where as other queries
require a variable data to be inputted when the query is run. The queries cannot be
seen in there tabular view. They either run in the background or run within a process.

116
System Maintenance

Packages

For this system I have used a database software to construct the structure of the
system. But to make some of the features for this system I have also used Visual
Basic for Applications.

All procedures are linked to a process


or button which is in a form. There is
also a module made for this system.
This has been made so that a global
password can be set. It also enables
the user to change the password
should it be required.

One command already present in the VBA software was the DoCmd procedure. This
allowed me to do many different controlling of data on the forms. Below coding is
shown for the customer accounts form.

This closing command is different to the


one below. The ‘End Sub’ separates the
procedures. The procedure also has
extra commands in the event a error
occurs. If so a Message box is displayed
using MsgBox.

This second procedure is for when the next button is clicked. It also uses the DoCmd
function but it varies from the first procedure.

117
System Maintenance

Global Variable
In the system rather than have many different passwords I have made one password
for the system. This is so that it is easier for the client to remember. To make this
global variable I have made a module where I have placed this variable. By global I
mean that it can be used in any procedure and is not restricted to any particular part
of the coding. It does not have to be opened when a procedure is run.

This is not a Dim because it is not going to be changed every time it is used. It is a
constant in computing terms so in the command it is stated as a constant string. This
meaning the password can be letters or numbers. The public allows the software to
know that it is not restricted to a private part of the procedures and can be used for
any procedure.

Customer Accounts
In the customer accounts form deleting records is also a part of the system. To do
this I have used VBA but to make sure only authorised people can use this function a
password protection has been added.

Here a input box appears when the procedure is run and asks for a password to
delete the record. The password can be any letter or number. Then a IF function is
used where IF something is (=,>,<> or <) to something then a certain process
happens else another process happens. In this if the password entered is equal to
the global password then the record is deleted else a message box appears. The
global password is used without having to add commands to open the global
password procedure. This is due to how the commands are written for the global
password.

118
System Maintenance

Main Menu
In the main menu you can access all the main forms. One form which is linked to the
main menu is the utility form. This has very sensitive processing which can be done.
To make sure only authorised people can enter VBA has been used to make sure
security is at maximum.

This is the code for the password protection on the opening of the utility form

Utility form
In this form there are many button links to reports and other forms. One button is a
very important part of the system. This button is the ‘change password’ button. This
allows the user to change the global password set on the whole system.

Below is the coding for when the receive promotions button is clicked on the utility
form. When this is done the procedure starts and only has one command. In this
procedure there is a ON ERROR function which then also includes GOTO where if a
error arises then the defined commands for the error start to run.

119
System Maintenance

Procedure & Functions List


Below is a list of functions and procedures which have been used for the system. They have
been made on VBA and they correspond to the button links I have used. These functions are
built into the system and they provide a basic structure on which the procedure can be built.

Procedure/Function Description Other procedures using it


GoToRecord,,acNewRec This is a function which is used on All forms used for adding
the forms to make a new record of new records to the system
the main form data source.
OpenForm”Form Name” This is a function which has been Main forms with the
used for the main navigation navigation bar use this
buttons. It opens the form which is function
entered into the function.
Quit This phrase is added to a procedure Used in password
so that when run it will close the protection and closing
whole system. buttons.
Sub (name of This is the procedure name and the Every procedure is using
object)_”When the second part can be changed so that this heading with slight
procedure is run e.g. when a particular action is taken modifications
click”() only then is the procedure run
GoToRecord,,acPrevious This function is used to go back one Used on all forms where
record on a form defined in the navigation is required.
command.
GoTo,,acNext This function is the same as the Used on forms where the
above except it goes one record records must be navigated.
down the list to the next record
DoMenuItem acFormBar, This function is used to search for a Customer details
acEditMenu, 10, , record from the main form data
acMenuVer70 source table.

GoToErr(name of This is used for when there is a Used in other procedures


object)_Click() error a certain object is opened

Variable List
Name Type Description
Docname String Opens the forms

Linkcriteria String To get the parameter of records which


to display on reports or forms.

120

Das könnte Ihnen auch gefallen