Font Size Property

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What is the syntax coding for change the fontsize property on the ONPrint
event.

I would to change the fontsize depending on the length of the Name.
 
What is the syntax coding for change the fontsize property on the ONPrint
event.

I would to change the fontsize depending on the length of the Name.

The Format event would be better than the Print event:
If Len([NameField])> 20 then
[NameField].FontSize = 8
Else
[NameField].FontSize = 10
End If
 
Thanks Fred,

This is exactly what I want to do.

Ileana


fredg said:
What is the syntax coding for change the fontsize property on the ONPrint
event.

I would to change the fontsize depending on the length of the Name.

The Format event would be better than the Print event:
If Len([NameField])> 20 then
[NameField].FontSize = 8
Else
[NameField].FontSize = 10
End If
 
I am getting an invalid indentifier on this line.

[NameField].FontSize = 8

Please advise.


iholder said:
Thanks Fred,

This is exactly what I want to do.

Ileana


fredg said:
What is the syntax coding for change the fontsize property on the ONPrint
event.

I would to change the fontsize depending on the length of the Name.

The Format event would be better than the Print event:
If Len([NameField])> 20 then
[NameField].FontSize = 8
Else
[NameField].FontSize = 10
End If
 
I am getting an invalid indentifier on this line.

[NameField].FontSize = 8

Please advise.

iholder said:
Thanks Fred,

This is exactly what I want to do.

Ileana

fredg said:
On Wed, 20 Jul 2005 13:55:01 -0700, iholder wrote:

What is the syntax coding for change the fontsize property on the ONPrint
event.

I would to change the fontsize depending on the length of the Name.

The Format event would be better than the Print event:
If Len([NameField])> 20 then
[NameField].FontSize = 8
Else
[NameField].FontSize = 10
End If

Did you change [NameField] to whatever the actual control name is?
 
Yes, changed it.

The fieldname is [Name] and the control name "Name".

The error message is: "Compile error: invalid qualifier.
My code is " Name.Fontsize = 10 "




fredg said:
I am getting an invalid indentifier on this line.

[NameField].FontSize = 8

Please advise.

iholder said:
Thanks Fred,

This is exactly what I want to do.

Ileana

:

On Wed, 20 Jul 2005 13:55:01 -0700, iholder wrote:

What is the syntax coding for change the fontsize property on the ONPrint
event.

I would to change the fontsize depending on the length of the Name.

The Format event would be better than the Print event:
If Len([NameField])> 20 then
[NameField].FontSize = 8
Else
[NameField].FontSize = 10
End If

Did you change [NameField] to whatever the actual control name is?
 
iholder said:
Yes, changed it.

The fieldname is [Name] and the control name "Name".

The error message is: "Compile error: invalid qualifier.
My code is " Name.Fontsize = 10 "

"Name" is a bad name to use for a field or control because most Access and
VBA objects have a property named "Name". This could be causing your
problem.
 
Yes, changed it.

The fieldname is [Name] and the control name "Name".

The error message is: "Compile error: invalid qualifier.
My code is " Name.Fontsize = 10 "

fredg said:
I am getting an invalid indentifier on this line.

[NameField].FontSize = 8

Please advise.

:

Thanks Fred,

This is exactly what I want to do.

Ileana

:

On Wed, 20 Jul 2005 13:55:01 -0700, iholder wrote:

What is the syntax coding for change the fontsize property on the ONPrint
event.

I would to change the fontsize depending on the length of the Name.

The Format event would be better than the Print event:
If Len([NameField])> 20 then
[NameField].FontSize = 8
Else
[NameField].FontSize = 10
End If

Did you change [NameField] to whatever the actual control name is?

Name is a reserved Access/VBA/Jet word and should not be used as a
field name.
See the Microsoft KnowledgeBase article for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'
 
Back
Top