Forum Discussion

NINER11's avatar
NINER11
Copper Contributor
May 13, 2023
Solved

New to access trying to print a car's specific info to a form and report

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 fo...
  • George_Hepworth's avatar
    May 14, 2023

    NINER11 

    Access 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.