subforms

N

Natasha

Hi

I have a main with customer info, Name address ect and a subform with Cooler
info. There can be more than one cooler per customer. The CompanyName field
is a combo box with a number of columns for addtess ect. The other fields are
filled in automatically using record source =companyname.column(3) ect and
this worked fine. The customer box was bound to CustomerID which links it to
the subform and the Link Master and child fields are CustomerID. The problem
with this was that the coolerinfo didn't come up when i chose a companyName.
The record source for the main form is qcustomer and for the subform is
tblservicehist.
So i changed the combo box to be unbound and created another text box called
customerID and the controlsource is CustomerID with coding put into the
afterupdate
Private Sub CompanyName_AfterUpdate()
Me.CustomerID.SetFocus
DoCmd.FindRecord Me.CompanyName
Me.CompanyName = Null

Now when i chose a companyName the cooler info comes up but the address ect
on the main for doesn't come up now.

Does anyone know why and how can i fix this.
Thx

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top