Upgraded 2007, coded stopped

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

Guest

Hello everyone,

I created a Access db when I was on MS Office 2000. Upgrading to 2003 was
painless, but now that I upgraded to 2007 all of a sudden my coding won't run
anymore.

I get a runtime 2447 error.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len([Text71]) > 4 Then ##this is the first error line
[Text71].FontSize = 5
Else
[Text71].FontSize = 9
End

This was never a problem before upgrading, at that point the code worked and
hasn't changed since.

What am I overlooking???
 
[Text71] = IIf(([ToDaySum]-[TodayPage])<=0,"",[ToDaySum]-[ToDayPage])

I assume the error comes from the fact that text71 can have a Null value???
Since on the first page there is nothing from previos pages. How do I get
around this??
 
I tried If Len(Nz([Text71])) > 4 Then etc etc

That gives a different error code with the same description

Run-time error '-2147352567 (80020009)':

There is an invalid use of . (dot) or ! operator or invalid parenthese

Jacco

Dennis said:
How about using:

If Len(nz(Text71)) > 4 Then

???

Seabird said:
Hello everyone,

I created a Access db when I was on MS Office 2000. Upgrading to 2003 was
painless, but now that I upgraded to 2007 all of a sudden my coding won't run
anymore.

I get a runtime 2447 error.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len([Text71]) > 4 Then ##this is the first error line
[Text71].FontSize = 5
Else
[Text71].FontSize = 9
End

This was never a problem before upgrading, at that point the code worked and
hasn't changed since.

What am I overlooking???
 
Okay, try this code EXACTLY as I show it below:

If Len(Nz(Me.Text71)) > 4 Then


Seabird said:
I tried If Len(Nz([Text71])) > 4 Then etc etc

That gives a different error code with the same description

Run-time error '-2147352567 (80020009)':

There is an invalid use of . (dot) or ! operator or invalid parenthese

Jacco

Dennis said:
How about using:

If Len(nz(Text71)) > 4 Then

???

Seabird said:
Hello everyone,

I created a Access db when I was on MS Office 2000. Upgrading to 2003 was
painless, but now that I upgraded to 2007 all of a sudden my coding won't run
anymore.

I get a runtime 2447 error.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len([Text71]) > 4 Then ##this is the first error line
[Text71].FontSize = 5
Else
[Text71].FontSize = 9
End

This was never a problem before upgrading, at that point the code worked and
hasn't changed since.

What am I overlooking???
 
Unfortunatly, no change in the outcome. All this function does is a
conditional format from the length of text. If too long a text, then reduce
the font size. I also noticed that in 2007 this for some reason (without the
formatting) comes up to a Name? instead of the normal result.

I may be trying to start solving at the wrong end. Maybe this causes the
error, so I want to take a look at the other code first.

Wish I could post the file :s



Dennis said:
Okay, try this code EXACTLY as I show it below:

If Len(Nz(Me.Text71)) > 4 Then


Seabird said:
I tried If Len(Nz([Text71])) > 4 Then etc etc

That gives a different error code with the same description

Run-time error '-2147352567 (80020009)':

There is an invalid use of . (dot) or ! operator or invalid parenthese

Jacco

Dennis said:
How about using:

If Len(nz(Text71)) > 4 Then

???

:

Hello everyone,

I created a Access db when I was on MS Office 2000. Upgrading to 2003 was
painless, but now that I upgraded to 2007 all of a sudden my coding won't run
anymore.

I get a runtime 2447 error.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len([Text71]) > 4 Then ##this is the first error line
[Text71].FontSize = 5
Else
[Text71].FontSize = 9
End

This was never a problem before upgrading, at that point the code worked and
hasn't changed since.

What am I overlooking???
 
bird, try ?len(nz(null))
in the immediate window. It should resolve to zero.
If you get an error, check your references.

UpRider
 
Back
Top