May 13 2023 02:16 PM - edited May 13 2023 02:23 PM
I have built a database for an auto repair shop and have it all done except for one detail I need to show up on the order form and the report printout.
I have a table that holds all of the cars for a specific customer and I would like to be able to pick a car from a customers multiple cars. The table I have has an "automobileID" (key) and a customerID (foreign), I'm just not clear how to get this in a dropdown so the person entering the data can choose from the specific cars. The thing is, the dropdown has to have the following fields from the automobile table, "make, model, mileage, VIN, EngineNumber, etc.., it's all listed in the autoT and related to the customer and to the order for that specific car. Any help would be so appreciated, thank you so much. Best Regards, Tony
May 13 2023 07:16 PM
May 14 2023 06:49 AM - edited May 14 2023 04:13 PM
SolutionAccess provides a really good mechanism for requirements of this sort.
Use a main form/sub form design.
The main form is bound to the Customer table.
The sub form embedded in that main form is bound to the automobile table.
The subform control (in which the automobile form is embedded) has a property that controls which records from the automobile table appear in the subform, the Master Linking Field Link Master Fields and the Child Linking Field Link Child Fields properties. This means that the automobiles displayed in the subform will be only those where the CustomerID is the same as the CustomerID for the currently selected record in the main form.
Because the subform can be displayed in Continuous view, ALL of the current customer's vehicles are displayed in full and you can select the one you want.
A similar mechanism is available for reports/subreports.
May 23 2023 07:06 AM
@George Hepworth Thank you and I'm sorry for the late reply as I had to get something working for them quickly, so I improvised until I could learn a more efficient process which I believe you have provided. I'll give it a try today and get back with you. Thank you again so much for your help. Best Regards, Tony.
May 23 2023 07:07 AM
May 27 2023 04:03 PM
@George Hepworth Thank you so much sir, the idea of adding a continuous form as a subform works perfectly. Thank you very much I'm very happy.
May 14 2023 06:49 AM - edited May 14 2023 04:13 PM
SolutionAccess provides a really good mechanism for requirements of this sort.
Use a main form/sub form design.
The main form is bound to the Customer table.
The sub form embedded in that main form is bound to the automobile table.
The subform control (in which the automobile form is embedded) has a property that controls which records from the automobile table appear in the subform, the Master Linking Field Link Master Fields and the Child Linking Field Link Child Fields properties. This means that the automobiles displayed in the subform will be only those where the CustomerID is the same as the CustomerID for the currently selected record in the main form.
Because the subform can be displayed in Continuous view, ALL of the current customer's vehicles are displayed in full and you can select the one you want.
A similar mechanism is available for reports/subreports.