| Author |
Report record source
|
|
|
| Hi
Is it possible to change the record source query of a report at runtime via
code so the report can work with different data source queries?
Thanks
Regards
| |
| Douglas J. Steele 2006-02-19, 1:24 pm |
| Sure. In the report's Open event, set its RowSource to whatever you want.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"John" <John@nospam.infovis.co.uk> wrote in message
news:%23pvf$jXNGHA.2124@TK2MSFTNGP14.phx.gbl...
> Hi
>
> Is it possible to change the record source query of a report at runtime
> via code so the report can work with different data source queries?
>
> Thanks
>
> Regards
>
>
| |
|
| If I am opening the report using OpenReport, how can I pass it the name of
query to open in Open event?
Thanks
Regards
"Douglas J. Steele" < NOSPAM_djsteele@NOSP
AM_canada.com> wrote in message
news:eAXq%23rXNGHA.2628@TK2MSFTNGP15.phx.gbl...
> Sure. In the report's Open event, set its RowSource to whatever you want.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "John" <John@nospam.infovis.co.uk> wrote in message
> news:%23pvf$jXNGHA.2124@TK2MSFTNGP14.phx.gbl...
>
>
| |
| Jamey Shuemaker 2006-02-19, 8:38 pm |
| if you're running A2K2 or later, you can use OpenArgs. otherwise you'll
have to monkey around with the 3rd and 4th arguments of the OpenReport
method (FilterName and WhereCondition).
| |
|
| I am using a2k. Any example of using FilterName or WhereCondition for this
purpose?
Thanks
Regards
"Jamey Shuemaker" <cantankeris@yahoo.com> wrote in message
news:1140382576.335535.52470@g14g2000cwa.googlegroups.com...
> if you're running A2K2 or later, you can use OpenArgs. otherwise you'll
> have to monkey around with the 3rd and 4th arguments of the OpenReport
> method (FilterName and WhereCondition).
>
| |
| UpRider 2006-02-19, 8:38 pm |
| I handle this by setting the report's record source to qtempQuery and then
creating the appropriate qtempQuery just before opening the report.
HTH,
UpRider
"John" <John@nospam.infovis.co.uk> wrote in message
news:%23pvf$jXNGHA.2124@TK2MSFTNGP14.phx.gbl...
> Hi
>
> Is it possible to change the record source query of a report at runtime
> via code so the report can work with different data source queries?
>
> Thanks
>
> Regards
>
>
| |
| Douglas J Steele 2006-02-20, 7:24 am |
| Neither FilterName nor WhereCondition would be appropriate for that.
You could use UpRider's suggestion, or you could use a global variable that
you use in the Open event.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"John" <John@nospam.infovis.co.uk> wrote in message
news:DoidnaTm5Mjrc2X
enZ2dnUVZ8qmdnZ2d@pi
pex.net...
> I am using a2k. Any example of using FilterName or WhereCondition for this
> purpose?
>
> Thanks
>
> Regards
>
> "Jamey Shuemaker" <cantankeris@yahoo.com> wrote in message
> news:1140382576.335535.52470@g14g2000cwa.googlegroups.com...
>
>
|
|
|
|