How to display CurrentDB.Name in form caption?

  • Thread starter Thread starter GaryS
  • Start date Start date
G

GaryS

That pretty much distills it:

What is the syntax for displaying something like:

Plant Database Main Menu <filename>

where <filename> is the value of CurrentDB.Name ?

IOW, how would I code the string expression in the form's
property sheet Caption ?

Thanks.
 
Use the Open event of the form to assign its Caption.

The code for the event procedure would be:

Private Sub Form_Open(Cancel As Integer)
Me.Caption = "Plant Database Main Menu - " & CurrentDb().Name
End Sub
 
Thanks, Allen, it worked great!

Gary
-----Original Message-----
Use the Open event of the form to assign its Caption.

The code for the event procedure would be:

Private Sub Form_Open(Cancel As Integer)
Me.Caption = "Plant Database Main Menu - " & CurrentDb ().Name
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.





.
 
Back
Top