M
mattc66 via AccessMonster.com
Hi All,
I need to confirm the existance of specific data in my If statement.
However the data is located in on subform and the code is run from another
subform.
I need to check to see if the word ROOM is in the fld called ITEM. If it is
it runs query1 if not it runs query2.
Current Code:
If Forms![Orders]![sfrmOrderSubform].Form![Item] = "ROOM" Then
DoCmd.OpenQuery "query1", acViewNormal
Else
DoCmd.OpenQuery "query2", acViewNormal
End If
The system doesn't like my code.
I need to confirm the existance of specific data in my If statement.
However the data is located in on subform and the code is run from another
subform.
I need to check to see if the word ROOM is in the fld called ITEM. If it is
it runs query1 if not it runs query2.
Current Code:
If Forms![Orders]![sfrmOrderSubform].Form![Item] = "ROOM" Then
DoCmd.OpenQuery "query1", acViewNormal
Else
DoCmd.OpenQuery "query2", acViewNormal
End If
The system doesn't like my code.