By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,509 Members | 2,201 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,509 IT Pros & Developers. It's quick & easy.

How to change the table name in a report?

P: n/a
I have reports formated and now need to use that format on another
table name with the same field names as formated in the report.
I belive it is in the properties but I can't seem to find it.
thanks

Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Sounds like dodgy database design, but that's your choice. Having two
tables with identical structures is a bit odd...

Simple, though. Make a copy of the report. Then open it in design
view, and change the recordsource to the new table. (view the
properties tab).

Nov 13 '05 #2

P: n/a

<pi********@hotmail.com> schreef in bericht news:11**********************@g43g2000cwa.googlegr oups.com...
Sounds like dodgy database design, but that's your choice. Having two
tables with identical structures is a bit odd...

Simple, though. Make a copy of the report. Then open it in design
view, and change the recordsource to the new table. (view the
properties tab).


Hmmm ...
Maybe also having two identical reports with only another recordsource is a bit odd ... ?

DoCmd.OpenReport "YourReportName", acViewNormal, "qryOtherRecordsource" won't do what you need?

Arno R
Nov 13 '05 #3

P: n/a
th***********@dva.state.wi.us wrote:
I have reports formated and now need to use that format on another
table name with the same field names as formated in the report.


Thomas, not meaning to be an ogre but this is stupid, stupid, stupid.
If you are going to do things this way, stick with Excel.

What you described is akin to setting a table for dinner and having your
guests get up and move to a different table for each course, because you
couldn't be bothered with picking up dishes from each course and
replacing with dishes for the next course.

Database design => 1 table, not redundant tables like you've described.
use one table and use queries to distinguish the two datasets you have
currently in two separate tables.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #4

P: n/a

Actually, it's not as "odd" as you might think.

Having two tables with identical structures is fairly common in
situations where there are "archived" records. Usually, the only
difference between the two tables is that one has a AutoNumber
(Yuck!), and the "Archive" table doesn't. This allows the moving of
records from one table to the other to "get them out" of the way of
"real" work.

I won't say that I endorse this solution, but I've seen it too many
times to say that it's "odd". Occasionally, I'll run into a DB where
both the "Active" table and the "Archive" table have Autonumbers in
them. <Major Sigh>

I usually get called in on these to solve the problem of why the users
can't link back from the "Archive" table.... D'Oh!
On 5 Jul 2005 09:58:31 -0700, pi********@hotmail.com wrote:
Sounds like dodgy database design, but that's your choice. Having two
tables with identical structures is a bit odd...

Simple, though. Make a copy of the report. Then open it in design
view, and change the recordsource to the new table. (view the
properties tab).


Nov 13 '05 #5

P: n/a

"Arno R" <ar***********@tiscali.nl> wrote in message
news:42********************@dreader2.news.tiscali. nl...

<pi********@hotmail.com> schreef in bericht
news:11**********************@g43g2000cwa.googlegr oups.com...
Sounds like dodgy database design, but that's your choice. Having two
tables with identical structures is a bit odd...

Simple, though. Make a copy of the report. Then open it in design
view, and change the recordsource to the new table. (view the
properties tab).


Hmmm ...
Maybe also having two identical reports with only another recordsource is a
bit odd ... ?

DoCmd.OpenReport "YourReportName", acViewNormal, "qryOtherRecordsource"
won't do what you need?

Arno R
"DoCmd.OpenReport" will not work because it will only filter the report
source.

If you are NOT using runtime, you can open the report in design mode, change
the source, save then print.
DoCmd.Echo False
DoCmd.OpenReport Reportn, acDesign
Reports("rptMyReport").RecordSource = "qryMyReportSource"
DoCmd.RunCommand acCmdSave
DoCmd.Close acReport, "rptMyReport"
DoCmd.Echo True

Otherwise change the source query before opening the report.
Nov 13 '05 #6

P: n/a

"paii, Ron" <pa**@packairinc.com> schreef in bericht news:mN********************@athenet.net...

"Arno R" <ar***********@tiscali.nl> wrote in message
news:42********************@dreader2.news.tiscali. nl...

<pi********@hotmail.com> schreef in bericht
news:11**********************@g43g2000cwa.googlegr oups.com...
Sounds like dodgy database design, but that's your choice. Having two
tables with identical structures is a bit odd...

Simple, though. Make a copy of the report. Then open it in design
view, and change the recordsource to the new table. (view the
properties tab).


Hmmm ...
Maybe also having two identical reports with only another recordsource is a
bit odd ... ?

DoCmd.OpenReport "YourReportName", acViewNormal, "qryOtherRecordsource"
won't do what you need?

Arno R


"DoCmd.OpenReport" will not work because it will only filter the report
source.

If you are NOT using runtime, you can open the report in design mode, change
the source, save then print.
DoCmd.Echo False
DoCmd.OpenReport Reportn, acDesign
Reports("rptMyReport").RecordSource = "qryMyReportSource"
DoCmd.RunCommand acCmdSave
DoCmd.Close acReport, "rptMyReport"
DoCmd.Echo True

Otherwise change the source query before opening the report.


It is true that DoCmd.OpenReport will only work when a filter is provided.
I completely forgot about this, because actually I do use filters in this case.

However my point is that one must try to prevent using duplicate reports.

One can also use code like this:
Private Sub Report_Open(Cancel As Integer)
If WhatEverCondition then Me.recordsource="NewRecordSource"
End Sub

In this case this recordsource does *not* have to be a filter on the original recsource.
Also: This works with the Runtime.

Arno R
Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.