L
Laurel
I would like to pass my current form as a paramter to a function in a
module. The function looks like this and compiles OK, but I can't figure
out how to call it "Call subTotalScores(Me)" doesn't work. Message is
#2450 "<database> can't find form 'afrm_Form' referred to in a macro or
Visual Basic Code."
I've also tried making the parameter a string and passing Me.Name
If I explicitly reference my current form, I get the correct value (e.g.,
Forms!frmScoreEntry![Safety]) evaluates to 5, the value of that column on
the open form.
Public Sub subTotalScores(afrm_Form As Form)
Dim li_safety As Integer
li_safety = 0
li_safety = Forms!acfrm_Form![Safety]
End Sub
I've messed around with various syntaxes....
module. The function looks like this and compiles OK, but I can't figure
out how to call it "Call subTotalScores(Me)" doesn't work. Message is
#2450 "<database> can't find form 'afrm_Form' referred to in a macro or
Visual Basic Code."
I've also tried making the parameter a string and passing Me.Name
If I explicitly reference my current form, I get the correct value (e.g.,
Forms!frmScoreEntry![Safety]) evaluates to 5, the value of that column on
the open form.
Public Sub subTotalScores(afrm_Form As Form)
Dim li_safety As Integer
li_safety = 0
li_safety = Forms!acfrm_Form![Safety]
End Sub
I've messed around with various syntaxes....