I have a smallish database of about 3500 records, school names. I have a 'go to and find' combo which throws an error every time you search for a school beginning with 'St'
as in abreviated 'Saint'.
Runtime error '3077';
syntax error (missing operator) in expression.
Code:-
Option Compare Database
Private Sub Command46_Click()
On Error GoTo Err_Command46_Click
DoCmd.GoToRecord , , acNewRec
Exit_Command46_Click:
Exit Sub
Err_Command46_Click:
MsgBox Err.Description
Resume Exit_Command46_Click
End Sub
Private Sub Combo51_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[SchoolName] = '" & Me![Combo51] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Command53_Click()
On Error GoTo Err_Command53_Click
DoCmd.Close
Exit_Command53_Click:
Exit Sub
Err_Command53_Click:
MsgBox Err.Description
Resume Exit_Command53_Click
End Sub
-:end of Code
rs.FindFirst "[SchoolName] = '" & Me![Combo51] & "'"
The line above seems to be the problem.
I am not really a VBCoder, any help appreciated.
as in abreviated 'Saint'.
Runtime error '3077';
syntax error (missing operator) in expression.
Code:-
Option Compare Database
Private Sub Command46_Click()
On Error GoTo Err_Command46_Click
DoCmd.GoToRecord , , acNewRec
Exit_Command46_Click:
Exit Sub
Err_Command46_Click:
MsgBox Err.Description
Resume Exit_Command46_Click
End Sub
Private Sub Combo51_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[SchoolName] = '" & Me![Combo51] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Command53_Click()
On Error GoTo Err_Command53_Click
DoCmd.Close
Exit_Command53_Click:
Exit Sub
Err_Command53_Click:
MsgBox Err.Description
Resume Exit_Command53_Click
End Sub
-:end of Code
rs.FindFirst "[SchoolName] = '" & Me![Combo51] & "'"
The line above seems to be the problem.
I am not really a VBCoder, any help appreciated.