SetValue - Access 2003

J

John S

Hi All,

I have created a macro to set the Caption of a Label (title of database) on
the Switchboard. When I close the Switchboard the Caption value reverts to
Null.

Can anyone help with this?

Regards,
John.
 
K

Ken Snell \(MVP\)

Unless your macro opens the form in design view and changes the caption
property of the label there, and then saves the form, you cannot permanently
change the caption of the label. NOTE: it's not recommended that you open a
form in design view and do this via a macro -- too many potential problems.

What is wrong with just setting the caption when you open the form each
time?
 
J

John S

Ken,

Thanks for the advice. I am trying to allow the user of the database to name
their collection of items on the database and then use that name to appear on
all the printed reports. If they have to re-type each time they open the
database the printed reports may be inconsistent if they misspell, etc.

I'm sure there is another (easier) way of doing this - any further thoughts
would be welcome.

Regards,
John.
 
K

Ken Snell \(MVP\)

John S said:
Ken,

Thanks for the advice. I am trying to allow the user of the database to
name
their collection of items on the database and then use that name to appear
on
all the printed reports. If they have to re-type each time they open the
database the printed reports may be inconsistent if they misspell, etc.

I'm sure there is another (easier) way of doing this - any further
thoughts
would be welcome.

The typical way of doing this would be to use a table to store user-specific
information such as this, and then to have the report/form read the desired
value for the user from that table for its display. You can use a form to
let the user enter his/her specific information and store the info in that
table. You'd just need a way to identify the specific user when the database
is opened so that the user is "found" in the table.
 
J

John S

Ken,

Many thanks... all working well now. Used DLookUp to retreive required data
from table.

Regards,
John.
 

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