Copy data from subform to main form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi! I have a main form with information pertaining to one job. On my subform,
I have a list of contractors who may or may not get that job. When you click
a checkbox on the subform to select the contractor that won the job (only one
per job), I would like the contractors name and address to be copied to the
billing info field on my main form. Can anyone help?
 
Hi, Debra.

One aspect of good relational database design is to have your tables
dedicated to describing aspects of ONE thing, without duplicating information
in one table that is completely defined in another. The winning contractor's
name, address, telephone, and whatever else you like is presumably fully
defined in your Contractors or Company table.

Rather than copying the name and address to billing info fields, base your
form and any reports that need to print info from the Contractors table on a
query that links your current main form record source with the subform record
source, and the subform record source with the Contractors table. Enter the
criteria True in the checkbox field of the subform, and select the main form
fields plus the desired Contractor fields.

Hope that helps.
Sprinks
 
Back
Top