Hi all,
I'm having some odd issues with my record selecting combobox on my form.
Form name: frm_OrderDetails
Bound table: tbl_Orders
Combobox: GoTo (unbound, placed in the header of the form)
Combobox settings -
Rowsource:
Bound Column: 1
Column Count: 4
Column Widths: 0";1";1";1"
How my database is set up, the main form (frm_Orders) is a basically a lookup/reference form that users can filter orders, which are displayed in a subform datasheet view. They can double click on an order to open up the frm_OrderDetails form which allows editing.
I've tried using the wizard to create a combobox to allow users to navigate to another record within the frm_OrderDetails form. It works until I close the form and open it again via the main form. Nothing happens when I select a different record from the combobox.
I've also tried the following VBA instead of the macro generated by the wizard in the AfterUpdate event for the combobox but the same issue occured. It worked until I closed/reopened the form. This one produces the error message box when selecting a different record:
Any ideas?
I'm having some odd issues with my record selecting combobox on my form.
Form name: frm_OrderDetails
Bound table: tbl_Orders
Combobox: GoTo (unbound, placed in the header of the form)
Combobox settings -
Rowsource:
Code:
SELECT [tbl_Orders].[OrderID], [tbl_Orders].[Order], [tbl_Orders].[PO], [tbl_Orders].[DateOrdered] FROM tbl_Orders;
Column Count: 4
Column Widths: 0";1";1";1"
How my database is set up, the main form (frm_Orders) is a basically a lookup/reference form that users can filter orders, which are displayed in a subform datasheet view. They can double click on an order to open up the frm_OrderDetails form which allows editing.
I've tried using the wizard to create a combobox to allow users to navigate to another record within the frm_OrderDetails form. It works until I close the form and open it again via the main form. Nothing happens when I select a different record from the combobox.
I've also tried the following VBA instead of the macro generated by the wizard in the AfterUpdate event for the combobox but the same issue occured. It worked until I closed/reopened the form. This one produces the error message box when selecting a different record:
Code:
On Error Resume Next
' Dim rst As Object
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
rst.FindFirst "OrderID = " & Me.GoTo
If Not rst.NoMatch Then
Me.Bookmark = rst.Bookmark
Else
MsgBox "Selection not found"
End If
'clean up
Set rst = Nothing
Any ideas?