Display Application title in report

  • Thread starter Thread starter lassang01
  • Start date Start date
L

lassang01

I am using a text box with control source =CurrentDb.Properties
("AppTitle") in my DB, but it returns #Name?
I want to display my DB app title in all my included reports,am using
MS Office SP3
any suggestion would be highly appreciated.
 
Have you set the property to a value?

Have your tried the expression in the VBA immediate window to see if it works?

What version of Access are you using?

In Access 2003 the expression works for me.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Thanks to your quick response
Please advise me how I could do the both first steps, I am using 2003
MS Office SP3.
Appreciate your help
 
Open your database in design view
Select TOOLS: Startup from the menu
Enter your Title in the Application Title control
Click OK

Press Control + G to open up the VBA
In the immediate window (normally bottom right of screen) enter
? CurrentDb().Properties("AppTitle")
and press return. That should return your title.

If this works then try your report again and see if it works.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Open your database in design view
Select TOOLS: Startup from the menu
Enter your Title in the Application Title control
Click OK

Press Control + G to open up the VBA
In the immediate window (normally bottom right of screen) enter
? CurrentDb().Properties("AppTitle")
and press return. That should return your title.

If this works then try your report again and see if it works.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

VBA returns my app title very fine by entering either
? CurrentDb().Properties("AppTitle") or
? CurrentDb.Properties("AppTitle")

but when I use the text box with control source I get following
errors:

=CurrentDb().Properties("AppTitle") I get Info msg that the expression
I entered is invalid
=CurrentDb.Properties("AppTitle") the control source is accepted but
the report returns #Name?

Could you please help
 
It works for me if I use the following as the control source of a text
control. Note the equal sign in front of the expression.
=[CurrentDb].[Properties]("AppTitle")

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
It works for me if I use the following as the control source of a text
control. Note the equal sign in front of the expression.
=[CurrentDb].[Properties]("AppTitle")

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

That doesn't work with me, the report or the form always returns
#Name?

Could anyone help me out please?

Thanks in advance
 
The only other option I can think of is to leave the control's source
blank and use the format event of the section to set the value for the
control.

In the relevant format event use
Me.txtBoxControl = Currentdb().Properties("AppTitle")

I can't think of any reason this works for me and doesn't work for you.

Can you try the original solution in a different report (or a new
report) and see if it works? If so, then there is something about your
current report that is triggering the error.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================


It works for me if I use the following as the control source of a text
control. Note the equal sign in front of the expression.
=[CurrentDb].[Properties]("AppTitle")

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

That doesn't work with me, the report or the form always returns
#Name?

Could anyone help me out please?

Thanks in advance
 
Back
Top