Noor said:
Actually i have a very long and complex query that takes a criteria to
accomplish.
In the current scenario, i have to write the whole query as sql statement in
my form module, with parameter, and then assinging it to the form
recordsource.
It's going well, but i just want to ask you people if there's way to make
this query a parameter query and then assign it to the form recordsource at
design time and provide a just provide the parameter at runtime.. so query
can execute.
Noor,
it seems, you want to change the form data at runtime, i.e. the form
should display different recordsets depending on some criteria without
closing it. Would then setting the form filter instead of using a
parameter query be a solution?
If you need just to open the form based on some criteria, then you can
use the solution described by John. Other solutions would be:
- write a public function and use it as a parameter
- use a query without parameter and set the WhereCondition of the
OpenForm statement as needed.
If all this does not fit, maybe you can give some more details.
Best regards
Emilia
Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de