Populating a Sub Form

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

Guest

Hello,

I have a main form (frmIssue) based on a table (tblDispatch)
There are several controls in frmIssue, however only two are applicable to
this question - "VehicleTripNo" and "Driver"(combobox based on tblEmployee)

The subform (sfrmDriver) is designed to display information from its table
(tblEmployee) via a query (qryDriver) based on the control in the main form
"Driver" (which has three columns - 0=ID Number, 1=LastName & 3=FirstName -
column0 being hidden and unique)...for the purposes of verifying expiration
dates of various documents in the tblEmployee table.

Now the problem - the query and the sub form work well (independently and
together) UNTIL the subform is placed in the main form - then it will not
work. The subform loses its data fields (they disappear).

I need it to display the info when the user completes (exits) the "Driver"
field.

Appreciate any help to set me straight.
Thanks
 
Probably, either the LinkMasterFields / LinkChildFields are not correctly
set or you use a Parametrised Query for the Subform and the reference to the
Control on the Main Form (as the parameter) is not correct when it is being
used as the Subform.

Post the RecordSource Queries for the MainForm and the Subform and the
linking Fields.
 
Van -
Thanks. That put me on the right track. The links were not right, I
corrected and it works.
 
Back
Top