Open a Form with a Where Condition

TJBernard

Registered User.
Local time
Today, 21:14
Joined
Mar 28, 2002
Messages
176
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.
 

Users who are viewing this thread

Back
Top Bottom