473,397 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Intermediate Table linking two tables

I'm currently building a DB that you will keep track of vehicles,
services to the vehicles and parts used for the servicing of the
vehicles.

I've created a table for Customers, Vehicles and Servicing which work
fine. The question I have is that I don't want to simply enter 10 x
Part Description, 10 x Part Cost in the servicing table for the user to
be able to enter the parts used .As on some occasions more parts will
be used and probably most frequently less than 10 parts will be used
for the servicing.

Looking through various DB designs I've come up with the following :-

Services Table,
Fields Service Id (PK), ServiceDate, ServiceDesc etc

Parts Used for Service Table
Fields ServiceParts (PK), Service ID (FK), ServiceParts

ServiceParts
Fields ServiceParts(PK), ServiceID, PartID, Qty etc

With this design it wouldn't then matter if the user used 1 part or
1000 parts for the service. The question is how can I set this up on an
Access form so that the intermediate table is updated correctly with
the correct values to keep the Relationship's correct between the three
tables.

I look forward to your answers in the near future.

Best Regards

Elfyn

Nov 13 '05 #1
1 3780

Have a form based on the services table, with a subform based on the table
ServiceParts.
In that subform, have field ServiceID hidden (at some point after testing),
have field PartID changed to a combobox, which is based on the table
PartsUsed.

In table PartsUsed, delete the column ServiceID because you don't need it
and it is confusing.

If you have more information in table Parts (e.g. part number), the you'd
make another field in the subform, similar to the PartID field, bound also
to PartID, with the combobox showing the other information through a query.
This way both fields change when you select another part.

btw, I think the names you choose are confusing.
I'd call them
- Services (Pk and perhaps with a FK to a customer table)
- Parts (PK)
- PartsUsedInService (table between the other two with FKs to Services and
Parts)

Bas Hartkamp.
<el***@ibabyshop.co.uk> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I'm currently building a DB that you will keep track of vehicles,
services to the vehicles and parts used for the servicing of the
vehicles.

I've created a table for Customers, Vehicles and Servicing which work
fine. The question I have is that I don't want to simply enter 10 x
Part Description, 10 x Part Cost in the servicing table for the user to
be able to enter the parts used .As on some occasions more parts will
be used and probably most frequently less than 10 parts will be used
for the servicing.

Looking through various DB designs I've come up with the following :-

Services Table,
Fields Service Id (PK), ServiceDate, ServiceDesc etc

Parts Used for Service Table
Fields ServiceParts (PK), Service ID (FK), ServiceParts

ServiceParts
Fields ServiceParts(PK), ServiceID, PartID, Qty etc

With this design it wouldn't then matter if the user used 1 part or
1000 parts for the service. The question is how can I set this up on an
Access form so that the intermediate table is updated correctly with
the correct values to keep the Relationship's correct between the three
tables.

I look forward to your answers in the near future.

Best Regards

Elfyn

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: mksql | last post by:
As an example, I am building an authentication mechanisim that will use data in the 3 left tables to determine rights to objects in a destination table, diagrammed below. In this structure,...
2
by: Wilder | last post by:
I'm trying to update a field in one table with the minimum values of the field in another table. The two tables are linked via a common field. I want to populate a date field in one table with...
2
by: TheTamdino | last post by:
One of the things that is common between most genealogy databases is that they will have one screen were you log all the information for a given person and then (maybe) have a link to a source...
2
by: dvelst | last post by:
Hi All, I have the following query which was based on a working query in MySQL: (don't be afraid of the size of the query you see below, later on I will concentrate on part of this query) ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.