append data from form to table

cdg

Registered User.
Local time
Today, 21:08
Joined
Apr 6, 2009
Messages
14
Hi
I have an appointments database on which I have a table “tblAppointments with fields named
Manufacturer, Model and Registration . There is a tblCustomers and tblVehicles,table , the Customers table has a Primary Key CustID and is linked to the vehicles table via a CustID field also with one to many relationship. When making an appointment a Form is opened frmBookAppointment which is based on a query, so basically when opened it shows customer details with three fields from the tblAppointments Manufacturer, Model and Registration and also has a subform with all the customer vehicles for that particular customer only.
The subform is in datasheet view and shows a manufacturer, Model and Registration in a row for each vehicle the customer owns . This all works great and the subform refreshes ok and shows correct vehicles etc. Now for my problem, going back to my table “tblAppointments”, What i want to happen is when the frmBookAppointment is opened and a customer is slected from the combo box and after the subform has refreshed with the customers vehicles(all this works ok up till this point) , an operator can double click on the row of the subform to select that particular vehicle for this appointment and that vehicles details are added in to the tblAppointments in the 3 fields Manufacturer, Model and Registration and then those details refresh on the frmBookAppointment in their respective text boxes.

I hope I have explained it properly and not rambled on and confused the issue.
Many thanks for your help on my previous post
Regards Chris
 
I recommend that you not copy this data, but rather you simply add a link in tblAppointments to the vehicle in question in tblVehicles.
To this end, simply add a VehicleID field to tblAppointments, and on that field (on frmAppointments) create a combo box, not a subform, from which the user selects from the vehicles available for the given customer.
 
Hi

I did consider this but my logic behind this method is that when an operator opens the frmBookAppointment and clicks the combo box to select the customer name it immidietly refreshes the subform with the vehicles that are linked to that customer so the operator can see if the right customer has been selected for this appointment.I thought this is an easy visual reference for the operator to select the right customer/vehicle combination when we have customers with the same surname. With the vehicles in a combo box it would mean selecting the surname then dropping down the vehicle combo box to see if the vehicles are the right ones and if not selcting the next customer with this surname in the combo box and then dropping down the vehicles combo box again to see the vehicle details and so on and so on untill we get the right customer/vehicle.

Or is there an easier way of acheiving what i want to happen ?

Hope this makes sense and i appreciate your time.

Regards Chris :confused:
 
Your second post makes no mention of copying data from one table to another. That is the only point I addressed in your first post.
Everything else seems pretty sensible to me.
 
Thanks for your reply Lagbolt your help is greatly apreciated as im a real novice at this :confused:


My main issue is to try and make this database as user friendly and idiot proof as possible.The tblAppointments fields are all filled with the relevant appointment data regarding each appointment except the manufacturer,model and Registration details for each and very appointment. The tblCustomers and tblVehicles are linked, therefore frmBookAppointment is based on a query that pulls data from the tblCustomer and tblAsset and the subform pulls data from tblVehicles
but when this form is open and the customers details and relevant vehicles details are visible I want the operator to be able to click the appropriate vehicle from the subform ( there may be several vehicles dislayed in the subform in a company vehicle situation) and this vehicles details are appended to the tblAppointment for that specific appointment.
Im not sure how to acheive this.
I may be going down the wrong route and getting blinkered by my objective but ive searched google for an example and i found a database example on a site that did, what I wanted to do.
Hope this makes sense

Thanks for your patience.

Regards Chris
 

Users who are viewing this thread

Back
Top Bottom