I have the following code to go to a record from a list box.
Option Compare Database
Private Sub List15_DblClick(Cancel As Integer)
'Requires reference to DOA 3.6
Dim db As DAO.Database
Dim rst As DAO.Recordset
DoCmd.OpenForm "mainform"
Set rst = Forms!mainform.Recordset.Clone
rst.FindFirst "[ID] = " & Me.List15
Forms!mainform.Bookmark = rst.Bookmark
'DoCmd.Close acForm, Me.Name
End Sub
Private Sub Text13_Change()
Dim vSearchString As String
vSearchString = Me.Text13.Text
Me.Search2.Value = vSearchString
Me.List15.Requery
End Sub
It keeps saying that there is a syntax error (missing operator). I have no idea why. The mainform opens, but does not bring up the chosen record. Please help.
Option Compare Database
Private Sub List15_DblClick(Cancel As Integer)
'Requires reference to DOA 3.6
Dim db As DAO.Database
Dim rst As DAO.Recordset
DoCmd.OpenForm "mainform"
Set rst = Forms!mainform.Recordset.Clone
rst.FindFirst "[ID] = " & Me.List15
Forms!mainform.Bookmark = rst.Bookmark
'DoCmd.Close acForm, Me.Name
End Sub
Private Sub Text13_Change()
Dim vSearchString As String
vSearchString = Me.Text13.Text
Me.Search2.Value = vSearchString
Me.List15.Requery
End Sub
It keeps saying that there is a syntax error (missing operator). I have no idea why. The mainform opens, but does not bring up the chosen record. Please help.