Help with Airport Transfer Database (1 Viewer)

grantty

New member
Local time
Today, 11:12
Joined
Mar 29, 2015
Messages
1
Hi All,

This is my first time using Access and i'm trying to make a airport transfer database for a family member. I have 3 tables Journeys,Drivers and Customers.All relationships are assigned and i've created forms for outbound and inbound journeys (all data is on one Journey table however). The problem I am having is that because outbound and inbound are all in the Journey table, once you assign a driver to the journey the driver is assigned to both outbound and inbound journeys (this however isnt always the case for the company). To fix it my best guess is that I will need to split the Journeys table into outbound and inbound tables, however I don't want 2 separate journeyIDs (primary key). Is there a way of connecting the two tables so that if I create an outbound journey it will have ID 1 then if it has a inbound journey this will have ID 2 (not 1 again becuase its the first inbound). Then the next booking made (on the outbound journey) will automatically have ID 3 (and not 2 because its the second outbound journey).

I hope i've explained it well enough and if you think im doing it completely the wrong way all advice would great :) thanks.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:12
Joined
Aug 30, 2003
Messages
36,125
What are the fields in the table? I'd probably have separate records, but if you want both in a single record, you could have separate fields for the driver of each leg.
 

Cronk

Registered User.
Local time
Today, 20:12
Joined
Jul 4, 2013
Messages
2,772
Me too, for having separate records for inwards and outwards for the very reason you don't have to have the same driver for both trips. And one table with a field to indicate inwards/outwards.

Customer(s) on the inwards trip will not necessarily have the same driver as the outwards, if in fact they are using the transport business both ways. EG, a permanent move, using a rental to drive to or from, using a friend for transport one way.
 

RogerCooper

Registered User.
Local time
Today, 03:12
Joined
Jul 30, 2014
Messages
286
You are mispecifying your database. Each leg should be a separate record.

A journey does not make sense. If you travel to 2 destinations before returning home you will returning from a different destination than you left for.

You can't even assume that each leg will connect directly with the other. Many cities have multiple airports.
 

Users who are viewing this thread

Top Bottom