Tracking Location from one form to another...

M

maura

I have a new database that needs to track a car's location. My one table is
the
tblRentalAgreement and (along w/ other things) I need to track where the car
is leaving from and where it is getting returned to. In some cases this maybe
the same. I have two fields:

tblRentalAgreement
LocationOut
LocationIn

I have another table for the car information tblCar. Along with other things
this needs to track where the car is.

tblCar
LocationId

I have a third tblLocation that only has two fields, so I can create a combo
box on my frmCar and choose the specific location (right now there is only a
list of 5 locations):

tblLocation
LocationId
Location

NOW, the question is how can I flow the tblRentalAgreement[LocationOut] to
the tblCar[Location] and when the car returns I need to have
tblRentalAgreement[LocationIn] to also update tblCar[Location].

Do I base both of the Forms for frmRentalAgreement and frmCar on a query
that combines both of these tables??? Or is this an event AfterUpdate that I
will need to update these fields on the Forms.

I am trying to plan this out and I am stuck on which came first the Location
in the tblRentalAgreement or the Location in the tblCar...

Suggestions, are sooo welcomed. Thanks, m.
 
A

Andy Hull

My approach would be...

1: Input car details including location - presumably stored in tblCar

Now the car is available for rental and can have a rental agreement - it
couldn't before (so location first exists in tblCar)

2: The car is to be rented & will eventually be booked out but not until an
agreement has been set up. You will have a form to create the agreement which
may work in 1 of 2 ways...

(i) Allow selection of any (available) car and set the agreement "location
out" equal to the car's current location (in tblCar)

(ii) If the database is a stand alone version in one physical location then
default the agreement location to the physical office location and allow
selection of cars only at that location.

3: Now car is booked out - no change to tblAgreement locations or tblCar
location (assuming tblCar location stays equal to "where it was when booked
out" until it is booked in again).

4:
Car is booked returned and booked in - Booking In form allows selection of
car & defaults "location in" to tblAgreement location in (you may allow this
to be overridden if it is possible to return a car to a different location
than agreed). On clicking OK on the booking in form update tblCar location to
the form's "location in"

hth

Andy Hull
 

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