On Mon, 11 Jul 2005 19:19:38 -0400, MLH <CR**@NorthState.net> wrote:
Now I see things like frmLookUpAvehicle (and other
form names) in the title bars on the forms. Can I change
all to the string returned by GetAppNameNver() in an
automated process from the immediate window or from
a utility form I make up just for the process?
Sub SetFormCaptions()
Dim i As Integer
Dim db As Database
Dim strNewCaption As String
Set db = CurrentDb
strNewCaption = GetAppNameNver()
For i = 0 To db.Containers(1).Documents.Count - 1
DoCmd.OpenForm db.Containers(1).Documents(i).Name, acDesign
Forms(db.Containers(1).Documents(i).Name).Caption = strNewCaption
DoCmd.Close acForm, db.Containers(1).Documents(i).Name, acSaveYes
Next
Set db = Nothing
End Sub