I am trying to open a form and have it's where clause filter by [size] and [color] from the current form. I cannot seem to get it to work. I get the error.
Syntax Error (Missing Operator) in query expression '[Size]=11 oz. And [Color]=Blue'.
"11 oz." and "Blue" are refference the correct record but it is not working.
My code looks like this.
On Error GoTo Err_Command15_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "MugInfo-Tbl"
stLinkCriteria = "[Size]=" & Me![Size] & " AND [Color]=" & "" & Me![Color] & ""
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command15_Click:
Exit Sub
Err_Command15_Click:
MsgBox Err.Description
Resume Exit_Command15_Click
End Sub
Can someone give me some advise?
Thanks
Terry
Syntax Error (Missing Operator) in query expression '[Size]=11 oz. And [Color]=Blue'.
"11 oz." and "Blue" are refference the correct record but it is not working.
My code looks like this.
On Error GoTo Err_Command15_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "MugInfo-Tbl"
stLinkCriteria = "[Size]=" & Me![Size] & " AND [Color]=" & "" & Me![Color] & ""
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command15_Click:
Exit Sub
Err_Command15_Click:
MsgBox Err.Description
Resume Exit_Command15_Click
End Sub
Can someone give me some advise?
Thanks
Terry