silentwolf
Well-known Member
- Joined
- May 14, 2008
- Messages
- 1,216
- Office Version
- 2016
Hi guys I have following situation,
I created a sfmKopf which has in the detailed section a logo and a label.
On the load event of this form I got this code.
I have also created a sub procedure with following code
So what I did is I got this sfmKopf and have inserted this form in the formHeading of other forms...
on the load event of each form I got this on load event..
Now in some forms when I loade this event I have no problem but on a some I get the runtime error of 2455
RunTime Error 2455
You have entered an expression that has an invalid reference to the property Form/Report.
I have exactly the same line of code in all forms well accept the string "Mitarbeiter Niederlassung"
does anybody can think of a solution to this problem?
Many thanks for help!
Silentwolf
I created a sfmKopf which has in the detailed section a logo and a label.
On the load event of this form I got this code.
Code:
Private Sub Form_Load()
LadeGrafikImage Me.imgLogo, "MyLogo-Logo-Mail.bmp"
LadeGrafikButton Me.btnSchliessen, "close.png"
End Sub
I have also created a sub procedure with following code
Code:
Sub SetzeFormularKopf(sfmDieserKopf As Form_sfmKopf, strTitel As String)
sfmDieserKopf.lblTitel.Caption = strTitel
On Error Resume Next
sfmDieserKopf.Parent.Caption = "Formular: " & strTitel
sfmDieserKopf.Detailbereich.BackColor = sfmDieserKopf.Parent.Formularkopf.BackColor
End Sub
So what I did is I got this sfmKopf and have inserted this form in the formHeading of other forms...
on the load event of each form I got this on load event..
Code:
Private Sub Form_Load()
SetzeFormularKopf Me.sfmKopf.Form, "Mitarbeiter Niederlassung"
End Sub
Now in some forms when I loade this event I have no problem but on a some I get the runtime error of 2455
RunTime Error 2455
You have entered an expression that has an invalid reference to the property Form/Report.
I have exactly the same line of code in all forms well accept the string "Mitarbeiter Niederlassung"
does anybody can think of a solution to this problem?
Many thanks for help!
Silentwolf