Renaming a form in code

B

Blondie

I have tried to use the rename command for a form and a report in code, but
get an error that states that "ACCESS cannot complete this operation. You
must stop the code and try again." None fo the forms or reports are open or
have been opened, the tables are not operned nor have been opened. I can't
use the copyobject for the forms or reports as the underlining code does not
get copied. Can anyone make a suggestion?
 
L

Lord Kelvan

are you saying form.name = "some new name"

because that property is read only and you cannot change it for a
hundred reason all of them being your appliction would break if you
did that. why are you trying to do this in the first place or is it
that you are trying to change the title of the form if that is the
case use form.caption = "some new title"

Regards
Kelvan
 
L

Lord Kelvan

that rename thing is designed for renaming unopened forms not opened
forms as the name as i said is readonly

Regards
Kelvan
 
B

Blondie

The forms are not opened when being renamed. I have standard forms for the
application, but occasionally I have to create a special form, that serves a
similar purpose but is different enough. These forms are then outputted into
a client. To try to eliminate all of the extra coding required for the
special forms I wanted to just rename my standard form to ****_Orig and then
rename the "Special" form to the same name as the standard form and then use
all of the same code previously written to output the "Special" form.
 

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


Top