A
Alain
Hi,
I need to use the Where Condition argument on the Docmd.Openform so I can
reduce to 1 entry forms in my db by applying conditions on the form instead
of having multiple same form with different query as RecordSource
I use the following:
Dim strCond as String
strCond = "[Active] = 'Yes' and [LeasedToThirdParty] = 'No'"
DoCmd.OpenForm Rst![Argument], acNormal, ,strCond
When I run the code I get the error 2501 not knowing why, can anyone let me
know what cause this to happen ?
To my understanding, the Where Condition arg is to restrick or narrow down
the amount of recordsets.
Is it possible that it narrows it down to one only instead of a few ?
If so then how can apply some criteria at the query level when I open a from
?
TIA
Alain
I need to use the Where Condition argument on the Docmd.Openform so I can
reduce to 1 entry forms in my db by applying conditions on the form instead
of having multiple same form with different query as RecordSource
I use the following:
Dim strCond as String
strCond = "[Active] = 'Yes' and [LeasedToThirdParty] = 'No'"
DoCmd.OpenForm Rst![Argument], acNormal, ,strCond
When I run the code I get the error 2501 not knowing why, can anyone let me
know what cause this to happen ?
To my understanding, the Where Condition arg is to restrick or narrow down
the amount of recordsets.
Is it possible that it narrows it down to one only instead of a few ?
If so then how can apply some criteria at the query level when I open a from
?
TIA
Alain