I am trying to open a form with a Where Condition. I am working in an ADP project, so I cannot build the query on the fly. I am trying to set the where condition on the Docmd.OpenForm code line to select the correct records.
Here is my code:
Dim strWhere at String
strWhere = "[Tape_Number] > 5"
DoCmd.OpenForm "frmResultsDateOr", , , WhereCondition:=strWhere
The where condition does not seem to be working, as it still selects all the records.
Am I missing anything or doing anything wrong?
Thank you,
T.J.
Here is my code:
Dim strWhere at String
strWhere = "[Tape_Number] > 5"
DoCmd.OpenForm "frmResultsDateOr", , , WhereCondition:=strWhere
The where condition does not seem to be working, as it still selects all the records.
Am I missing anything or doing anything wrong?
Thank you,
T.J.