search and other stuff (1 Viewer)

Ironis

Learning Member...
Local time
Yesterday, 23:22
Joined
Oct 10, 2002
Messages
61
Hi, I'm having a little problem here

I'm building a reservationsystem, and I'm quite new to access..
Nou I want a form to show a reservation, that works fine, but I want some additions to that.

On the form, the following values are shown:
Reservation#
CustomerID
ProgframID
# of persons
Pickup y/n
pickuptime

Now i want the pickuptime to show automatically with a specific programID. I've got in the table programID different timeblocks, becouse there are 3 timeblocks on a day, sow when program 2 is selected, the timeblock will be 2 and the pickuptime 11am. Another piossibility is with a certain caption in the ProgramID block (it shows the program name, but stores programID)
How can i do this??

also I want a search on the form, by reservationnumer, or by customerID (prefferrably a combobox,so the customer can be selected, and the rigt reservation(s) can be shown..

Can anyone help me on these questions?
 

Rob.Mills

Registered User.
Local time
Yesterday, 22:22
Joined
Aug 29, 2002
Messages
871
This is how I would set this up. Could be a lengthy explanation so bear with me.

I would split your data into two tables. First one contain these fields:

Reservation#
CustomerID
ProgframID
# of persons
Pickup y/n

The next table would be:

ProgramID (Primary Key)
pickuptime

Then create a one-to-many relationship between the two:

One: ProgramID on the 2nd table
Many: ProgramID on the 1st table

Now base the form on a query or SQL statement. Use both tables and pull all the fields from the first table but ONLY 'pickuptime' from the 2nd table (very important not to have the primary key of the 2nd table in the query).

What will happen is when someone chooses a programID the recordsource will fill in the pickuptime.
 

Ironis

Learning Member...
Local time
Yesterday, 23:22
Joined
Oct 10, 2002
Messages
61
that sounds like a good solution, I will try it, guess it will work!

Thanks!!
 

Users who are viewing this thread

Top Bottom