Very Strange one here...........
I've created a Class Object, named ManagementLevel .
When I open my DB, it established a new object of that type and assigns various values as needed. I can use this object absolutely anywhere in my DB, as I have made this object Public.
(HIGHLY simplified, but just for demonstration)
However, when I have a report, I am unable to use that object:
Compiling produces the error: "Method or data member not found"--even though everywhere else in the DB that has this code, all is fine. In fact, the VBA Editor does not even bring up the possible list of values, either.
After some experimentation , I have determined that at as long as I don't have a Record Source for the Report, all is well. However, as soon as I assign a Record Source, it throws the error.
Any ideas?
Thanks for the hepp!
I've created a Class Object, named ManagementLevel .
When I open my DB, it established a new object of that type and assigns various values as needed. I can use this object absolutely anywhere in my DB, as I have made this object Public.
(HIGHLY simplified, but just for demonstration)
Code:
Option Compare Database Option Explicit Public ML As New ManagementLevel Public Sub _ SetDBDefaults() On Error GoTo EH ML.Images = "\\SERVER\FOLDER\IMAGES\" Exit Sub EH: MsgBox "You big dummy!" Exit Sub End Sub
Code:
Private Sub _ Detail_Format( _ Cancel As Integer, _ FormatCount As Integer) Me.imgMLShield.Picture = ML.Images & "MLWhite.jpg" End Sub
After some experimentation , I have determined that at as long as I don't have a Record Source for the Report, all is well. However, as soon as I assign a Record Source, it throws the error.
Any ideas?
Thanks for the hepp!
Comment