M
mattc66 via AccessMonster.com
I want to double Click on a field in my form and open a query and the where
clause filters the data and only shows me the records that match. I added the
below WHERE clause, but it doesn't seem to work. Can anyone help with the
correct syntax?
Private Sub Name_DblClick(Cancel As Integer)
Dim StDocName As String
stDocName = "QueryName"
DoCmd.OpenQuery stDocName, acNormal, acEdit
End Sub
SELECT TableName.*
FROM TableName
WHERE (((TableName.FieldName)=[forms]![frmMainName]![form]![sfrmSubFormName]!
[FieldName]));
clause filters the data and only shows me the records that match. I added the
below WHERE clause, but it doesn't seem to work. Can anyone help with the
correct syntax?
Private Sub Name_DblClick(Cancel As Integer)
Dim StDocName As String
stDocName = "QueryName"
DoCmd.OpenQuery stDocName, acNormal, acEdit
End Sub
SELECT TableName.*
FROM TableName
WHERE (((TableName.FieldName)=[forms]![frmMainName]![form]![sfrmSubFormName]!
[FieldName]));