I have a form with 2 combo boxes.
First combobox is VenQuickFind
Rowsource the query below
SELECT qSupplierNameID.ID, qSupplierNameID.Name_1 FROM qSupplierNameID ORDER BY [Name_1];
this the name and index ID of the supplier.
After Update event is the follwing:
Private Sub VenQuickFind_AfterUpdate()
Dim rst As DAO.Recordset
Dim StrSearchname As String
Set rst = Me.RecordsetClone
StrSearchname = Str(Me!VenQuickFind)
rst.FindFirst "ID = " & StrSearchname
Me.Bookmark = rst.Bookmark
Forms!F_VRS!POQuickFind.SetFocus
Me.POQuickFind.Requery
Me.POQuickFind.Value = Me!POQuickFind.ItemData(0)
End Sub
Second Combobox is POQuickfind
Rowsource is:
SELECT qPOQuickFind.PO_Number, qPOQuickFind.ID FROM qPOQuickFind;
here is were I am stuck. VenQuickfind correctly pulls the Purchase Order numbers and populates POQuickfind combo box. I have a subform that lists all the purchase orders and I want to filter only by the PO Number that is selected in the second combo box. I have tried the following but I think my syntax is wrong:
Private Sub POQuickFind_AfterUpdate()
Dim POCombo As String
POCombo = "PO_NUMBER =" & Me.POQuickFind & ""
Forms!F_VRS!subfrmIncomingMerge!PO_Number.SetFocus
DoCmd.ApplyFilter , POCombo
End Sub
I am sure there is a better way to do this but I have not learned enough VB yet.
Any help here?
First combobox is VenQuickFind
Rowsource the query below
SELECT qSupplierNameID.ID, qSupplierNameID.Name_1 FROM qSupplierNameID ORDER BY [Name_1];
this the name and index ID of the supplier.
After Update event is the follwing:
Private Sub VenQuickFind_AfterUpdate()
Dim rst As DAO.Recordset
Dim StrSearchname As String
Set rst = Me.RecordsetClone
StrSearchname = Str(Me!VenQuickFind)
rst.FindFirst "ID = " & StrSearchname
Me.Bookmark = rst.Bookmark
Forms!F_VRS!POQuickFind.SetFocus
Me.POQuickFind.Requery
Me.POQuickFind.Value = Me!POQuickFind.ItemData(0)
End Sub
Second Combobox is POQuickfind
Rowsource is:
SELECT qPOQuickFind.PO_Number, qPOQuickFind.ID FROM qPOQuickFind;
here is were I am stuck. VenQuickfind correctly pulls the Purchase Order numbers and populates POQuickfind combo box. I have a subform that lists all the purchase orders and I want to filter only by the PO Number that is selected in the second combo box. I have tried the following but I think my syntax is wrong:
Private Sub POQuickFind_AfterUpdate()
Dim POCombo As String
POCombo = "PO_NUMBER =" & Me.POQuickFind & ""
Forms!F_VRS!subfrmIncomingMerge!PO_Number.SetFocus
DoCmd.ApplyFilter , POCombo
End Sub
I am sure there is a better way to do this but I have not learned enough VB yet.
Any help here?