Copying a form

S

Shell

In Access2000 I can easily copy a form using DoCmd.CopyObject. But how do I
change some properties without opening the form?

Thanks
 
C

Chris O'C via AccessMonster.com

The easy way to make changes is to open the form in design view. The hard
way is to export the form with saveastext to a text file, programmatically
make the changes in the text file, then import the text file as a form with
loadfromtext, overwriting the current form.

Why do you want to avoid opening the form?

Chris
 
S

Shell

I need to let a power user do the following in code.
1. Copy a template form to a new name
2. Change some properties, such as
A. RecordSource
B. Form Caption
C. Maybe some column headings.

The user does not have access to the code or design view of forms, queries
or tables.
 
C

Chris O'C via AccessMonster.com

Any user who creates an object *owns* the object so you can't prevent them
from opening the object in design view immediately after the user creates the
new form. Well you could but you'd have to close the Access session, run
fancy-schmancy code in another instance of Access, and open the db again
where the user is not the owner of the object he/she just made because it's
been deleted and another copy (made by another user) has taken its place.

Chris
 

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

Top