Changing the source of a report

L

Lisa R

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?
 
D

Douglas J. Steele

Assuming the form (or report) is open, you can use

Forms![NameOfForm].RecordSource = "NewQueryName"

or

Reports![NameOfReport].RecordSource = "NewQueryName"
 
J

John W. Vinson

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]
 
J

John W. Vinson

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Data Source 4
querry 1
Combo Box Rowsource property 2
Help Me Fix Min Max Avg Querry 1
Eliminate Duplicated 2
partial cell value query by date range? 2
Need help on Iff Statement 1
Report order 7

Top