473,320 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Naming reports created programatically

Hi all

I'm creating a number of reports programatically, and I'd like to be able to name them sensibly. However, when I try something like
Expand|Select|Wrap|Line Numbers
  1.  rptNew.Name = "something sensible"
I just get told that "this property is read-only and can't be set".

Am I trying to do something you can't do? Or am I just doing it wrong?

Thanks in advance

Peter.
May 29 '08 #1
2 1047
puppydogbuddy
1,923 Expert 1GB
Hi all

I'm creating a number of reports programatically, and I'd like to be able to name them sensibly. However, when I try something like
Expand|Select|Wrap|Line Numbers
  1.  rptNew.Name = "something sensible"
I just get told that "this property is read-only and can't be set".

Am I trying to do something you can't do? Or am I just doing it wrong?

Thanks in advance

Peter.
Peter,
If the report exists, you can call the Rename() method of the DoCmd object. The syntax to use is:

DoCmd.Rename(NewName, acReport, OldName)

Remember that your report can't be open at the time you rename it, or you will get an error.
May 29 '08 #2
puppydogbuddy

That's really helpful, thank you!
May 29 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: patC | last post by:
In the typical xsl you create elements as follow <xsl:for-each select="fname"><FriendlyName></FriendlyName></xsl:for-each In this case I need to create the name of the element programaticall ...
5
by: dandi.reyes | last post by:
Does anyone have the steps to using crystal reports with .asp pages?
3
by: gudia | last post by:
I want to Programatically generate Access reports in the pdf format using some tool and then email them to people in the same code. Right now I am trying to do this with pdf995 using VBA (emailing...
13
by: RCS | last post by:
I have a UI that needs a couple of threads to do some significant processing on a couple of different forms - and while it's at it, update the UI (set textboxes, fill in listviews). I created a...
1
by: CS Wong | last post by:
Hi, I have a page form where form elements are created dynamically using Javascript instead of programatically at the code-behind level. I have problems accessing the dynamically-created...
1
by: Kiran | last post by:
Hi, I have my reports at http:\\localhost\ReportServer and need to use them in ASP.NET Web Form.I have a few questions reg. this ------> I want to generate a PDF when a button labeled...
114
by: Jonathan Wood | last post by:
I was just wondering what naming convention most of you use for class variables. Underscore, "m_" prefix, camel case, capitalized, etc? Has one style emerged as the most popular? Thanks for...
3
by: Zammy | last post by:
Is there a way to specify different field names in a temporary table created using VBA? I just inherited a program and now the users want to export results to Excel. The original programmer only...
3
by: =?Utf-8?B?cml2YWxAbmV3c2dyb3Vwcy5ub3NwYW0=?= | last post by:
I've a situation where I'm creating controls programatically. I'm programatically creating table cells and rows. I've got an array of data, and I want to format the data on screen in rows of 4. ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.