J
jbeggie
Hey,
Could anyone please help me? I have a subform linked to a main for
Master link is a text field on the main form while child link is
unique column on the subform. The RecordSource of the subform is
query. What I want to do is to populate other unbound textfield
whenever I click on or select a record in the subform.
My query works well. I can get the first record to populate thes
fields but itt sits there and wouldn't move when I select the nex
record in the subform.
Below is the code I use in the "AfterUpdate" event of of the comb
field (Master Link Field).
Private Sub cboFirmID_AfterUpdate()
txtFirmName = cboFirmID.Column(1)
strSQL = "Select * from Brand Where"
strSQL = strSQL & " FirmID=" & Me!cboFirmID.Text
Me!frmBrandSubform.Form.RecordSource = strSQL
'These are the main codes that populate the unbound textfields
txtBrandName = Me!frmBrandSubform.Form![BrandName]
txtBrandID = Me!frmBrandSubform.Form![BrandID]
txtFee = Me!frmBrandSubform.Form![Fee]
txtRegDate = Me!frmBrandSubform.Form![RegDate]
End Su
Could anyone please help me? I have a subform linked to a main for
Master link is a text field on the main form while child link is
unique column on the subform. The RecordSource of the subform is
query. What I want to do is to populate other unbound textfield
whenever I click on or select a record in the subform.
My query works well. I can get the first record to populate thes
fields but itt sits there and wouldn't move when I select the nex
record in the subform.
Below is the code I use in the "AfterUpdate" event of of the comb
field (Master Link Field).
Private Sub cboFirmID_AfterUpdate()
txtFirmName = cboFirmID.Column(1)
strSQL = "Select * from Brand Where"
strSQL = strSQL & " FirmID=" & Me!cboFirmID.Text
Me!frmBrandSubform.Form.RecordSource = strSQL
'These are the main codes that populate the unbound textfields
txtBrandName = Me!frmBrandSubform.Form![BrandName]
txtBrandID = Me!frmBrandSubform.Form![BrandID]
txtFee = Me!frmBrandSubform.Form![Fee]
txtRegDate = Me!frmBrandSubform.Form![RegDate]
End Su