G
Guest
I am trying to use a combo box as navigation for a form in single form view,
allowing me (hopefully) to select the record for the form to display from a
pull-down list. I am trying to use the following code to achieve this:
Private Sub Combo40_AfterUpdate()
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
rst.FindFirst "SupplierTbl.Company_Name=" & Me.Combo40.Column(0)
If Not rst.NoMatch Then
Me.Bookmark = rst.Bookmark
Else
MsgBox "Record not found."
End If
Set rst = Nothing
End Sub
I have had some difficulty with this however. I'm not sure whether it has to
do with the SQL statement for the row source in the combo (which currently
reads: SELECT SupplierListTbl.SupplierID,
SupplierListTbl.[Company Name] FROM SupplierListTbl ORDER BY [Company
Name]
or whether I'm actually barking up the wrong tree entirely. Can
anyone either point me in the right direction for making this thing work or
suggest another approach (basically I want to jump to a record instantly
without having to scroll through all contiguous records or needing to know
the record number)
thanks
Jake
allowing me (hopefully) to select the record for the form to display from a
pull-down list. I am trying to use the following code to achieve this:
Private Sub Combo40_AfterUpdate()
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
rst.FindFirst "SupplierTbl.Company_Name=" & Me.Combo40.Column(0)
If Not rst.NoMatch Then
Me.Bookmark = rst.Bookmark
Else
MsgBox "Record not found."
End If
Set rst = Nothing
End Sub
I have had some difficulty with this however. I'm not sure whether it has to
do with the SQL statement for the row source in the combo (which currently
reads: SELECT SupplierListTbl.SupplierID,
SupplierListTbl.[Company Name] FROM SupplierListTbl ORDER BY [Company
Name]

anyone either point me in the right direction for making this thing work or
suggest another approach (basically I want to jump to a record instantly
without having to scroll through all contiguous records or needing to know
the record number)
thanks
Jake