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???
Seabird - 28 Jun 2007 18:16 GMT
[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??
> Hello everyone,
>
[quoted text clipped - 15 lines]
>
> What am I overlooking???
Dennis - 28 Jun 2007 18:50 GMT
How about using:
If Len(nz(Text71)) > 4 Then
???
> Hello everyone,
>
[quoted text clipped - 15 lines]
>
> What am I overlooking???
Seabird - 28 Jun 2007 19:00 GMT
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
> How about using:
>
[quoted text clipped - 21 lines]
> >
> > What am I overlooking???
Dennis - 28 Jun 2007 19:04 GMT
Okay, try this code EXACTLY as I show it below:
If Len(Nz(Me.Text71)) > 4 Then
> I tried If Len(Nz([Text71])) > 4 Then etc etc
>
[quoted text clipped - 31 lines]
> > >
> > > What am I overlooking???
Seabird - 28 Jun 2007 19:20 GMT
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
> Okay, try this code EXACTLY as I show it below:
>
[quoted text clipped - 35 lines]
> > > >
> > > > What am I overlooking???
UpRider - 28 Jun 2007 22:21 GMT
bird, try ?len(nz(null))
in the immediate window. It should resolve to zero.
If you get an error, check your references.
UpRider
> Hello everyone,
>
[quoted text clipped - 17 lines]
>
> What am I overlooking???