Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / September 2005

Tip: Looking for answers? Try searching our database.

runtime after upgrading

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jacco - 13 May 2005 09:56 GMT
Hi everyone, I recently upped my MS Access from 2000 to 2003. Previously I
put a lot of effort in some coding, which now stopped working by a runtime
error (2447) Illegal use of . (dot) or !

Any help is appreciated..

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len([Text71]) > 4 Then
[Text71].FontSize = 6
Else
[Text71].FontSize = 9
End If
If Len([Text72]) > 4 Then
[Text72].FontSize = 6
Else
[Text72].FontSize = 9
End If
End Sub

Thanks,
Jacco
Douglas J. Steele - 13 May 2005 11:49 GMT
Try using Me![Text71] and Me![Text72] (or is it Me.[Text71] and
Me.[Text72]?) instead of simply referring to the control name.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Hi everyone, I recently upped my MS Access from 2000 to 2003. Previously I
> put a lot of effort in some coding, which now stopped working by a runtime
[quoted text clipped - 17 lines]
> Thanks,
> Jacco
Jacco - 13 May 2005 12:38 GMT
I tried both with ! and with . (dot), but I still get the same error. I just
don't understand it... Did I misunderstand where to put these?? I tried
every combination..

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len(Me![Text71]) > 4 Then
Me![Text71].FontSize = 6
Else
Me![Text71].FontSize = 9
End If
End Sub

My complete script looks like this:

Option Compare Database
Option Explicit
Public MPSum As Double
Public MPPage As Double
Public DurationSum As Double
Public DurationPage As Double
Public ToNightPage As Double
Public LaNightPage As Double
Public ToDayPage As Double
Public LaDayPage As Double
Public ToNightSum As Double
Public LaNightSum As Double
Public ToDaySum As Double
Public LaDaySum As Double
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len([Text71]) > 4 Then
[Text71].FontSize = 6
Else
[Text71].FontSize = 9
End If
If Len([Text72]) > 4 Then
[Text72].FontSize = 6
Else
[Text72].FontSize = 9
End If
If Len([Text74]) > 4 Then
[Text74].FontSize = 6
Else
[Text74].FontSize = 9
End If
If Len([Text75]) > 4 Then
[Text75].FontSize = 6
Else
[Text75].FontSize = 9
End If
If Len([Text77]) > 4 Then
[Text77].FontSize = 6
Else
[Text77].FontSize = 9
End If
If Len([Text78]) > 4 Then
[Text78].FontSize = 6
Else
[Text78].FontSize = 9
End If
If Len([Text80]) > 4 Then
[Text80].FontSize = 6
Else
[Text80].FontSize = 9
End If
If Len([Text81]) > 4 Then
[Text81].FontSize = 6
Else
[Text81].FontSize = 9
End If
End Sub
Private Sub Detail_Print(Cancel As Integer, FormatCount As Integer)
   MPSum = MPSum + Reports![Jar_Jeppesen_L]![MP]
   MPPage = MPPage + Reports![Jar_Jeppesen_L]![MP]
   DurationSum = DurationSum + Reports![Jar_Jeppesen_L]![Duration]
   DurationPage = DurationPage + Reports![Jar_Jeppesen_L]![Duration]
   ToNightSum = ToNightSum + Reports![Jar_Jeppesen_L]![tonight]
   ToNightPage = ToNightPage + Reports![Jar_Jeppesen_L]![tonight]
   ToDaySum = ToDaySum + Reports![Jar_Jeppesen_L]![today]
   ToDayPage = ToDayPage + Reports![Jar_Jeppesen_L]![today]
   LaNightSum = LaNightSum + Reports![Jar_Jeppesen_L]![LandNight]
   LaNightPage = LaNightPage + Reports![Jar_Jeppesen_L]![LandNight]
   LaDaySum = LaDaySum + Reports![Jar_Jeppesen_L]![LandDay]
   LaDayPage = LaDayPage + Reports![Jar_Jeppesen_L]![LandDay]
End Sub
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
' reset the counter for each new page
MPPage = 0
DurationPage = 0
ToDayPage = 0
ToNightPage = 0
LaDayPage = 0
LaNightPage = 0
End Sub

> Try using Me![Text71] and Me![Text72] (or is it Me.[Text71] and
> Me.[Text72]?) instead of simply referring to the control name.
[quoted text clipped - 20 lines]
>> Thanks,
>> Jacco
ph - 13 May 2005 13:03 GMT
do you have the same References ?
Open some code and point to Tools - References.

> I tried both with ! and with . (dot), but I still get the same error. I just
> don't understand it... Did I misunderstand where to put these?? I tried
[quoted text clipped - 115 lines]
> >> Thanks,
> >> Jacco
Jacco - 13 May 2005 13:24 GMT
Besides the fact that now my data objects is version 11 instead of 10 (what
it used to be).. it appears so. Both use VB6...

> do you have the same References ?
> Open some code and point to Tools - References.
[quoted text clipped - 120 lines]
>> >> Thanks,
>> >> Jacco
downunderling - 25 Sep 2005 14:56 GMT
Hello Jacco,
Did you resolve this issue? The same thing is occuring to my code which
worked previously. I am perplexed.
This is the line that it errors:
   If Me.[Sum Of amount] = 0.01 Then x = 0
the "Me.[Sum Of amount]" is a text box on a report

Thanks

> Besides the fact that now my data objects is version 11 instead of 10 (what
> it used to be).. it appears so. Both use VB6...
[quoted text clipped - 123 lines]
> >> >> Thanks,
> >> >> Jacco
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.