Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VBA to Change Control Captions

Status
Not open for further replies.

dftjsn

Programmer
Feb 25, 2002
43
US
I have a form on which I want to change some of the control captions on the fly with VBA prior to opening it with OpenForm. It seems that I'm only able to change the control captions after the form has been opened. In another circumstance it doesn't work at all when I open the form with OpenForm "Form Name",,,,,acDialog. Can I use VBA to change control captions before opening the form and why can't I seem to change control captions of a form opened with acDialog?

Thanks!

dftjsn
 
It is certainly doable.

1. Before opening the form, set the value of the form caption to a public variable pstrCaption.

2. In the form open event, set the form caption to be pstrCaption.

Seaport.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top