corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Database (Access 2003) People...help


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Database (Access 2003) People...help
Aaron
Member

Registered: 9th Aug 04
Location: Cottingham, East Riding
User status: Offline
27th Dec 09 at 16:53   View User's Profile U2U Member Reply With Quote

I have to make a database for a car hire company (for a uni assignment)

All tables have been made, linked together using the correct relationships etc...oh, and i've populated them with all the required records (50).

I need to make a form which the person at the car hire company will fill in when a customer walks in or calls up on the phone.

The form i want to have will contain the customer details (name, address, contact number, d.o.b etc) and also some basic info about the car they want to hire...the type of car (small compact, family etc) and the number of doors.

The information about the customer and car are on different tables, and can i fook work out how to create a form which allows me to populate the information to both tables from only one form. When i select all the data i want from the customer table to go in the form, all is fine. Then, i select the info i want from the car table (car type, and number of doors)...and when i click "finish" (to create the form), all i get is a box on the screen with the title of "Rental" (which is the name of one of my tables)


I dont get it

Any ideas?

Databases are gay. Fact.

[Edited on 27-12-2009 by Aaron]
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Offline
27th Dec 09 at 18:03   View Garage View User's Profile U2U Member Reply With Quote

It should be three tables because there's a many to many relationship between customers and cars, rental being the intermediary junction table.

You need to be clear what you're writing to and what are lookups that don't need a write. Booking the rental is a write to the rental table, but you need customers and car in place first as there should be referential integrity on the relationships so you can't have an orphan rental record which doesn't have a corresponding dependency. But you are only writing to the rental table, not to the others. Design your form with this in mind.

I'm not big on forms as I would generally write a proper app, and its also been a while since I used 2003 but my guess would be to alter the table design of the rental table so its a Lookup column (2007 does this, not sure about 2003), and create the form after this change is made.

You could also make a query where the three tables are included and you've got the correct field names in place then design the form based on the query, not the single tables. Again, I'm only guessing as I'm not sure exactly what functionality you have available.
Aaron
Member

Registered: 9th Aug 04
Location: Cottingham, East Riding
User status: Offline
27th Dec 09 at 19:31   View User's Profile U2U Member Reply With Quote

I sort of understand what you're trying to say, but i still can't sort it.

Dont suppose anyone on here would be kind enough to take a look? the database file is only about 3.3MB, so can be easily e mailed.
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Offline
28th Dec 09 at 01:12   View Garage View User's Profile U2U Member Reply With Quote

In short - the booking is not one form.

If the phone call relates to making a booking, you need the rental table. This assumes the customer details are in place (and also car, but they're more likely to be).

If you need to add or edit customer details, I would guess that you need to do this on another form.
Ian W
Member

Registered: 8th Nov 03
Location: Wirral, Merseyside
User status: Offline
28th Dec 09 at 01:20   View User's Profile U2U Member Reply With Quote

Easiest way to do this is just create a form which allows you to input the information that you want then use code behind the form to write the table updates.

You can use your existing table that holds car information to filter selections on the form if you wish.

When you hit finish have vba write all infromation to the tables, job done

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Simple Access Question Mikorsa16v Geek Day 5 579
11th Jun 03 at 19:57
by Ian
 
PHP database connection help! Planty02 Geek Day 13 951
10th Sep 06 at 21:51
by Planty02
 
Bit of help please.... (MS Access) Haimsey Geek Day 2 156
26th Apr 07 at 20:58
by James_DT
 
Access 2007 Jodi_the_g Geek Day 2 147
3rd Jan 08 at 10:00
by Jodi_the_g
 
help with Excel Macro Fonz Geek Day 2 319
10th Jun 09 at 11:45
by Fonz
 

Corsa Sport » Message Board » Off Day » Geek Day » Database (Access 2003) People...help 29 database queries in 0.0119700 seconds