• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

dynamically change form caption

Hi Experts

I have large number of forms and would like to change their caption through code

thanks
0
drivers
Asked:
drivers
1 Solution
 
Rey Obrero (Capricorn1)Commented:
you can use this in a load event of the form

me.caption="MyName"

0
 
driversAuthor Commented:
Sorry if I wasn't clear
let me explain I would like to change all Form caption in mdb through one shot?
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
The same caption on all forms ?

mx
0
 
OP_ZaharinCommented:
- the following is a code in VBA.
- it will display all form caption in this format <FormName : My Standard Caption>'. you can change the stdCaption to any title value that you required:


Const stdCaption = " : My Standard Caption"

Sub FormCaption()
Dim allfrm As Object
For Each allfrm In CurrentProject.AllForms
    DoCmd.OpenForm allfrm.Name, acDesign
    Forms(allfrm.Name).Caption = allfrm.Name & stdCaption
    DoCmd.Close acForm, allfrm.Name, acSaveYes
Next
End Sub
0
 
driversAuthor Commented:
Thanks everyone
OP Zaharin solution worked.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now