wizcow
Registered User.
- Local time
- Today, 13:59
- Joined
- Sep 22, 2001
- Messages
- 236
hi, i have a find form where info is selected from combo boxes
then displays it in the embedded sub form.
table = Parts
form=Search
subform=SearchSub
combo box =Vendor
=PartType
=Model
when i select something from "cboVendor" my code works, but because
the table "Parts.VendorID" is in a relationship with the table "Vendors" it only displays a number in "cboVendor". I need help with coding the relationship in.
here is the afterupdate procedure from the combo box "cboVendor"
Private Sub cboVendor_AfterUpdate()
Dim strSQL As String
Dim strSQLSF As String
'clear the combo boxes
cboPartType = Null
cboModel = Null
'set the list in the sub form
strSQLSF = "SELECT * FROM qrySearchParts "
strSQLSF = strSQLSF & " WHERE qrySearchParts.VendorID = " & cboVendor & ""
strSQLSF = strSQLSF & " WHERE qrySearchParts.VendorName = " & cboVendor & ""
Me!SearchSub.LinkChildFields = "VendorID"
Me!SearchSub.LinkMasterFields = "VendorID"
Me.RecordSource = strSQLSF
Me.Requery
End Sub
[This message has been edited by wizcow (edited 12-30-2001).]
[This message has been edited by wizcow (edited 12-30-2001).]
[This message has been edited by wizcow (edited 12-30-2001).]
[This message has been edited by wizcow (edited 01-02-2002).]
then displays it in the embedded sub form.
table = Parts
form=Search
subform=SearchSub
combo box =Vendor
=PartType
=Model
when i select something from "cboVendor" my code works, but because
the table "Parts.VendorID" is in a relationship with the table "Vendors" it only displays a number in "cboVendor". I need help with coding the relationship in.
here is the afterupdate procedure from the combo box "cboVendor"
Private Sub cboVendor_AfterUpdate()
Dim strSQL As String
Dim strSQLSF As String
'clear the combo boxes
cboPartType = Null
cboModel = Null
'set the list in the sub form
strSQLSF = "SELECT * FROM qrySearchParts "
strSQLSF = strSQLSF & " WHERE qrySearchParts.VendorID = " & cboVendor & ""
strSQLSF = strSQLSF & " WHERE qrySearchParts.VendorName = " & cboVendor & ""
Me!SearchSub.LinkChildFields = "VendorID"
Me!SearchSub.LinkMasterFields = "VendorID"
Me.RecordSource = strSQLSF
Me.Requery
End Sub
[This message has been edited by wizcow (edited 12-30-2001).]
[This message has been edited by wizcow (edited 12-30-2001).]
[This message has been edited by wizcow (edited 12-30-2001).]
[This message has been edited by wizcow (edited 01-02-2002).]