If I have generated a report with a given table or querry and I want to keep
the format, but change the source (table or querry), how do I do that?

Signature
See me for who I am and not who you want me to be,. That way no one gets
disappointed!
Douglas J. Steele - 18 Jan 2008 19:26 GMT
Assuming the form (or report) is open, you can use
Forms![NameOfForm].RecordSource = "NewQueryName"
or
Reports![NameOfReport].RecordSource = "NewQueryName"

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> If I have generated a report with a given table or querry and I want to
> keep
> the format, but change the source (table or querry), how do I do that?
John W. Vinson - 18 Jan 2008 19:39 GMT
>If I have generated a report with a given table or querry and I want to keep
>the format, but change the source (table or querry), how do I do that?
Open the report in design view. View its Properties; on the Data tab the first
row is the Recordsource property.
This will be either the name of your table or query, or a SQL string (a local
query, basically).
Replace it with your other query name.
If you need to do this routinely, you should ask why you need different
queries for (apparently) the same kind of data - might a single Parameter
query letting you dynamically change the criteria for the query be an
alternative?
John W. Vinson [MVP]
Lisa R - 18 Jan 2008 20:21 GMT
What if nothing shows up on the DATA tab?

Signature
See me for who I am and not who you want me to be,. That way no one gets
disappointed!
> >If I have generated a report with a given table or querry and I want to keep
> >the format, but change the source (table or querry), how do I do that?
[quoted text clipped - 13 lines]
>
> John W. Vinson [MVP]
John W. Vinson - 18 Jan 2008 21:20 GMT
>What if nothing shows up on the DATA tab?
Are you looking at the properties of the Report itself? Or the Detail or some
other section? Be sure to get the right properties: right mouseclick the
little square at the upper left intersection of the rulers in design view and
select Properties.
If you are, and there is a blank next to Recordsource, then your report is
unbound and won't display any data (there's no data to display). You can set
the property to the name of a query to display data from that query.
John W. Vinson [MVP]
Lisa R - 21 Jan 2008 11:56 GMT
Thanks. I'll check again.

Signature
See me for who I am and not who you want me to be,. That way no one gets
disappointed!
> >What if nothing shows up on the DATA tab?
>
[quoted text clipped - 8 lines]
>
> John W. Vinson [MVP]