Documente Academic
Documente Profesional
Documente Cultură
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
Home
Services
Examples
Downloads
Our Clients
About Us
Contact Us
http://www.softwarematters.co.uk/creatingmsaccessstockcontroldatabase.html
1/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
We use cookies, just to track visits to our website, we store no personal details.
ACCEPT COOKIES
What are
cookies?
Sample Download
2/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
3/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
same time? Do you have just one supplier for each part you
stock? Do you order a range of items from each supplier or does
each supplier just provide you with one type of item? Your design
will also be different if you stock items for manufacturing rather
than to sell on. Keep the answers to these questions in mind as
we go into the next step.
Define the tables required
Information in a database is held in tables. By this point you
should have some idea of the information the database needs to
hold to achieve your goals.You need to categorise this
information into a set of tables.To start with you dont even
need to do this in Access, just make a list by hand or in another
program.
The tables within our example database are: Parts, Customers,
Orders, PartTypes, PurchaseOrders and Suppliers.To keep
things simple, we are going to assume that each customer orders
just one part at a time, and that we order just one part from a
supplier at a time. Of course this might not be true for you; your
customers may order a whole selection of items together, and
you will probably buy a range of items in one go. In this case youll
need a table that holds all the parts linked to each order, probably
called Order Items.
Weve made a similar sort of assumption about customers,
assuming they are all individual people or small companies; for
large business customers with multiple addresses or phone
numbers to store you would perhaps need a more advanced set
of tables to hold all in the information consistently. But all this is a
more advanced topic really, so well just show you the simple way
for now using tables with more basic goals.
http://www.softwarematters.co.uk/creatingmsaccessstockcontroldatabase.html
4/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
5/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
6/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
addresses into forms and reports, and it eases data entry because
Access is happy to store the multiple lines in one field.
While thinking what fields you need, you should make sure they
all have unique names, unless two fields actually contain the same
information. Only in this case should you give them the same
name, like with PartTypeCode earlier. Something to keep in mind
with your names is that if you want to progress to using SQL
queries or Visual Basic for Applications (VBA) code with your
database, you will find life easier if you have no spaces in the table
names or field names. So that is why weve been writing
PartTypes as one word, rather than having the space.
Another tip to keep in mind is that is it bad practice to give a field
a name that is already being used behind the scenes by Access for
something else. These so-called Reserved Words include things
like name, date, level and money, among many others. You
can look up a full list of Access reserved words online to make
sure none of your fields use one. This can help avoid confusion in
the database engine between predefined words and your field
names, which is left unchecked can sometimes cause serious
errors.
Create your tables in Access
To create a Parts table and define its fields:
1. In MS Access 2013/2010/2007 click on the Create tab on the
Ribbon, then on Table Design. This opens a new table in
design view. Each row in design view represents a field in
the table. (in Access 2003, click on Tables in the list of
Objects then click the New button which opens a dialog box
called New Table. Finally select Design View, and click OK)
http://www.softwarematters.co.uk/creatingmsaccessstockcontroldatabase.html
7/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
PartNo
10-character text
string
PartName
50-character text
string
Name/description of
this part
20-character text
http://www.softwarematters.co.uk/creatingmsaccessstockcontroldatabase.html
8/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
PartUnit
string
Meters, box of 10
SupplierRef
6-character text
string
StockLevel
Integer
MinStockLevel
Integer
The minimum
number of this part
in stock before you
need to re-order
CostPrice
Currency
SalePrice
Currency
PartType
1-character text
string
255-character text
PartNotes
http://www.softwarematters.co.uk/creatingmsaccessstockcontroldatabase.html
9/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
string
http://www.softwarematters.co.uk/creatingmsaccessstockcontroldatabase.html
10/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
11/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
8-character text
string
first 4 letters of
surname (e.g.
SMIT0001). This
will make it easy to
find individual
customers. This field
is the primary key.
CustomerFirstName
20-character text
string
CustomerSurname
25-character text
string
CustomerAddress
255-character text
string
CustomerTel
15-character text
string
The telephone
number of this
supplier
CustomerRef
12/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
Once you've got the hang of it, go through the rest of your
planned tables setting them up too. Youll see your new tables
appearing in the object browser on the left as you make them
(press F11 to bring this browser up if you can't see it).
Relationships
Relationships are set up within the database, to show the way in
which one table relates to another. A one-to-many relationship
is the most common kind of relationship. In this relationship, a
record in one table can have more than one matching record in a
second table, but each record in the second table can have only
one matching record in the first table. For example, each Part
can have only one Part Type, but for each PartType there are
likely to be many parts of that type.
If each part has only one supplier as in our example, then this is
another straightforward one-to-may relationship. If each part can
be supplied by several different suppliers, then you will need a
different design.
In our example database, the following relationships between
tables are required.
Suppliers - Parts, to specify the supplier of each part.
Parts - PurchaseOrders, showing the part ordered on a purchase
order.
Parts - Orders, showing the part ordered by a customer.
Customers - Orders, showing the customer for each order.
PartTypes - Parts, classifying each part into a particular part type.
As an example well show you how to set up the relationship
between the tables Parts and PartTypes. Before you start doing
relationships it is a good idea to write some sample information
http://www.softwarematters.co.uk/creatingmsaccessstockcontroldatabase.html
13/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
into your tables that features entries with are as long as you think
youll ever use. This will help out a little with some settings youll
need to adjust later.
1. Set up the field PartTypeCode in the Part Types table as a
single-character text string defining the part type.
2. Make this field the primary key
3. Open the Parts table in Design view.
4. Add a field PartTypeCode to the Parts table. Make sure it is
also a single-character text string.
5. Now click in the Data Type column of the Part type field to
display a down arrow. Click this to display a drop-down list,
and select Lookup Wizard.
6. Select I want the lookup column to look up the values in a
table or query. Click Next.
7. From the list of tables displayed, select the PartTypes table.
Click Next.
8. Click the fields you want included in your lookup column. In
this case, we will select both fields. Click Next.
9. A sort order can be selected if required. Select Description.
Click Next.
10. The next step allows you to define the width of the columns
in your lookup column and to specify whether you wish the
key column (the column containing the primary field key) to
be displayed.By default the key column is not displayed, and
in our case we just want to view the description, so leave the
tick in the box.Now set the width of your lookup column
by dragging the edge to the position you require. If you have
already entered some data in the PartTypes table this will be
displayed to help you to adjust the column to the width of
the likely contents. Click Next.
11. Now select the label for your lookup column. The
http://www.softwarematters.co.uk/creatingmsaccessstockcontroldatabase.html
14/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
15/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
http://www.softwarematters.co.uk/creatingmsaccessstockcontroldatabase.html
16/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
17/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
http://www.softwarematters.co.uk/creatingmsaccessstockcontroldatabase.html
18/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
19/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
20/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
21/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
Automation
Access allows you to write custom code in its Visual Basic for
Applications language, known as VBA. You can set up piece of
code to run when you perform certain actions or just on
command. This enables you to automate many processes. For
example, you might want your system to adjust your recorded
stock levels automatically whenever a delivery is received, or you
might want the Customer Reference field to be built
automatically from the surname of the customer. Using VBA to
automate features can make a database more powerful and easier
to use, but it does require programming knowledge so its a more
advanced step to take in your databases development.
So that's all for this tutorial article. If you decide that building your
own stock control database is not for you after all, we at
Software-Matters are happy to offer advice about alternatives via
our free initial consultation.Contact us on 01747 822616 or fill
in an enquiry form here and we will get back to you. Thanks for
reading!
http://www.softwarematters.co.uk/creatingmsaccessstockcontroldatabase.html
22/23
4/5/2016
TutorialHowtoCreateanMSAccessStockControlDatabase:PLUSFreedownload
WHAT WE DO
Bespoke Database Design
Management Software Design
Web Software & Design
Excel & Spreadsheet Design
MS Access Development
Bespoke GIS
Database/Software Design
VBA Programming
Database FAQs
Tuition
BENEFITS
Benefits Home
Growth
Efficiency
Save Money
Save Time
Information
Less Stress
ARTICLES
Our Recent Projects
News
How to Import an Esri ASCII
Grid into an MS Access
Database
Creating an MS Access
Contact Management
Database
Creating an MS Access Stock
Control Database
MS Access help & tips
MS Excel help & tips
Management Software Tools
Bespoke v's off-the-shelf
Spreadsheets and Excel
Viewing data out of the office
MS Access Benefits
MS Access 2007 Benefits
MS Access 2010 Benefits
MS Access 2013 Benefits
MS Access Training
MS Excel 2007 Benefits
CONTACT US
T: 01747 822616
E: Web enquiries
Contact form
http://www.softwarematters.co.uk/creatingmsaccessstockcontroldatabase.html
23/23