basic help needed for report creation

liuec

Registered User.
Local time
Today, 18:07
Joined
Jun 23, 2011
Messages
25
Hello,
Itd be much appreciated if someone could let me know what is the proper way to create report based an existing template, rename it and then save it.

I'm also looking for ways to replace the source in the generated report to another name using VBA.... is it possible?

Thanks so much!
 
Take a look at this link it will give you the details about changing record source for a form or report

http://msdn.microsoft.com/en-us/library/aa173233(v=office.11).aspx

When you write

Itd be much appreciated if someone could let me know what is the proper way to create report based an existing template, rename it and then save it.

Do you mean a report already exist and you want to use that as the base and then generate other reports using this base, if so open the report in Design view, Press F12 on the keyboard this will take you to Save As then give it a different name, if you need to change the data source you can do that at the same time.
 
That's a helpful link, thanks. :)

Yes, basically replicating an existing report with different names. What is the proper vba commands in access for this to happen?



Take a look at this link it will give you the details about changing record source for a form or report

http://msdn.microsoft.com/en-us/library/aa173233(v=office.11).aspx

When you write



Do you mean a report already exist and you want to use that as the base and then generate other reports using this base, if so open the report in Design view, Press F12 on the keyboard this will take you to Save As then give it a different name, if you need to change the data source you can do that at the same time.
 
You can use a DoCmd command to copy an object

In Red is new report name, in Blue is the original

DoCmd.CopyObject , "rptEmail23", acReport, "rptEmail"
 
Edit: problem solved, need to add docmd.close acreport.....
So here's the new problem, how do I edit the property of a textbox in the report? Such that I need to edit the recordsource of the textbox in the report.....

Here's another question, I've seen many places online where the code looks like Me.txtbox= .... what does Me replace here? Or rather what is Me? My access 2003 doesn't seem to recognize this command here. Am i missing a reference? Any ideas?


Thanks!



Hi, exactly what i'm looking for, the only problem is that this command won't run in a loop, for instance:

=====================================================

Do while i < 10
DoCmd.CopyObject , "Email" & i & "Report", acReport, "ReportSample"
i = i + 1
Loop
=====================================================


This would give me an error 29068 saying microsoft access cannot complete the operation....

Any ideas?

Thanks a bunch!

You can use a DoCmd command to copy an object

In Red is new report name, in Blue is the original
 
Last edited:

Users who are viewing this thread

Back
Top Bottom