Computer Inventory

H

Harold Druss

Hi All
I'm trying to design a computer inventory program with VB6 using Access as a
backend.

I have the follwing tables so far.
tblLocations
tblComputers
tblSoftware
tblLink_Computers_Software
tblPrinters
tblMonitors

My question is that any Location has 1 computer, but they have more
Computers than Locations.
I tried adding a location called Storage, but I don't know how to create
that relationship.

Do I need a seperate table named tblStorage or another link table?

I'm having trouble showing the computers in Storage.

I'm retired and volunteer at my local library. I'm not very good at VB or
Access.

Thak you very much.
Harold
 
J

Jason Lepack

Computers:
computer_id - autonumber - pk
computer_name - text - no duplicates

Locations:
location_id - autonumber - pk
location_name - text - no duplicates

Computer_Locations:
computer_id - Number - unique - required
location_id - Number - unique - required
(Both fields combined are the PK)

Relate these tables, using "Tools" -> "Relationships", make sure to
enable Referential Integrity.

This will allow each computer to exist in one location, allow each
location to have only one computer. If there does not exist a record
in this table for a specific computer, or location, then that means it
doesn't have one.

Cheers,
Jason Lepack
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top