Drop Down box prompting for CustomerID

Topham

Registered User.
Local time
Today, 03:28
Joined
Apr 2, 2010
Messages
31
Hello,

Sorry about the wrong read just thought id need to explain what i needed.

Ive been creating a Database system for my mums partner's business. He is a thrill ride inspector, therefore he inspects rides you get in fairs. He has Customers Information and the customers rides. Everything is working great but there is one niggle that he would like to avoid.

I have created a form to Book Inspections, all works ok. I have fields that include Customer Id, Customer 1st name, Second name and then there is a drop down box for the Ride that the inspection is for.

This is where the niggle is. This drop down box is connected to a query that searches for all rides that associate to the customer id. So it brings up a prompt to ask for the customer ID and then displays the results in a list when the query is ran itself.

On the actual form itself when i click on the drop down box for the ride, a Enter Parameter box appears to enter the Customer ID to find the rides and it shows in a list for the drop down which is cool, but he would like this to happen automaticaly.

Is there a way of the drop down box using the Number from a Different Field to get the ride information so it doesnt keep on asking for the ID when i click on the drop down box? Or is there a way of having the Parameter Field filled automatically?

Regards,
Mathew
 
Mathew,

I you have a table of Customers and a Table of Rides for customers, then on you inspection booking form you should not need the "Customer Names" fields. Remove them and change the Customer ID field into a combo box that will have the CustomerID field as the first column and being the bound field to the control but do not display this colulmn. Also have the customer's name (you many need to concatenate the first and second names together) as the second column and display this colum so the user can simply select the desired customer. This will automatically store the CustomerId in the bound value of the combo box.

Then you can have your combo to display only those rides that are owned by the selected customer.

This is refered to a cascading combo boxes. Do a search here on the fourms and you should find plenty of help on the subject.
 
Thank you Mr B for your advice i got it working the way the company wanted it.

I created a query with the CustomerID, RideID and Ride name columns and for the search criteria i set it to use what ever was in the CustomerID field on the Booking form. Then for the drop down box i got it to show the RideID and Name that was on the result of the query by using the select code.
 
I am glad you got things working the way you needed them to. There is always more than one way to do the same thing.
 

Users who are viewing this thread

Back
Top Bottom