J
jon.howitt
I get the following error message when trying to execute this form
Syntax error (missing operator) in query '[Function]= xxx AND
[Caseref]=yyy'.
Heres the code I can't find what's wrong with it.
Option Compare Database
Private Sub Combo14_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Nz(Me![Function], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub OpenNew_Click()
On Error GoTo Err_OpenNew_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Issues_change"
stLinkCriteria = "[Function]=" & Me![Function]
stLinkCriteria = stLinkCriteria & " AND [Caseref]=" & Me![Caseref]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OpenNew_Click:
Exit Sub
Err_OpenNew_Click:
MsgBox Err.Description
Resume Exit_OpenNew_Click
End Sub
Any assistance would be Greatly appreciated.
Cheers
Jon_H
Syntax error (missing operator) in query '[Function]= xxx AND
[Caseref]=yyy'.
Heres the code I can't find what's wrong with it.
Option Compare Database
Private Sub Combo14_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Nz(Me![Function], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub OpenNew_Click()
On Error GoTo Err_OpenNew_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Issues_change"
stLinkCriteria = "[Function]=" & Me![Function]
stLinkCriteria = stLinkCriteria & " AND [Caseref]=" & Me![Caseref]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OpenNew_Click:
Exit Sub
Err_OpenNew_Click:
MsgBox Err.Description
Resume Exit_OpenNew_Click
End Sub
Any assistance would be Greatly appreciated.
Cheers
Jon_H