Repost: problem with initialize for class module

J

jfp

When i create a new instance of a class module, the associated
Initialize event does not seem to fire.
More specifically, i never reach a breakpoint set in
EEE_PrintReport_Class_Initialize()

(note: EEE_REPORTPARAMS is a UDT defined elsewhere)
-=-=-=
In the main form:
Private PR As EEE_PrintReport_Class
Private RepParams As EEE_REPORTPARAMS

Set PR = New EEE_PrintReport_Class
' Supposedly, the Initialize event should fire HERE ...
RepParams = PR.ReportParams() ' This sets default values

-=-=-=
The class module:

Private RP As EEE_REPORTPARAMS

Public Property Let ReportParams(x As EEE_REPORTPARAMS)
RP = x
End Property

Public Property Get ReportParams() As EEE_REPORTPARAMS
ReportParams = RP
End Property

Private Sub EEE_PrintReport_Class_Initialize()

'**
'* Possible initializations here of various UDT members to
'* "sensible" defaults.
'* Since memory is initially zeroed, the initial states are:
'* numeric types: Zero
'* Booleans: False
'* strings: empty ("")
'* dates
'**

RP.iCopies = 1 ' # of copies to print
RP.bEditPath = True ' user is allowed to change file path
RP.bEditName = True ' user is allowed to change file name

End Sub
-=-=-=
Any ideas ?
 
E

Emilia Maxim

jfp,

I just tested this in A97 and the code was displayed and halted at the
breakpoint. I cannot change system now, but if you have a higher
version maybe there is some option under Tools /Options.
If you read the ReportParams right after setting the new PR, what are
the values of the structure items?

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 
J

jfp

sorry -- i forgot version details:
Access 2002 (XP)
NO service packs installed
Windows 2000

re your question -- the values are all zero byte ("", False, 0, etc.)
-=-=
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top