J
Jean-Paul De Winter
Hi,
I am struggeling with programming a module.
I wrote:
Private Sub Keuzelijst0_Click()
On Error GoTo einde
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE Patienten SET Patienten.punten = False WHERE
Patienten.punten=True;"
DoCmd.SetWarnings True
Me!LK = Me!Keuzelijst0
Me!Periode = Empty
Me!ll = Empty
Me!Vak = Empty
Dim strWhere As String
With Forms![rapporten ingeven]
strWhere = "([lk])='" & Forms![rapporten ingeven]![Keuzelijst0] &
"'"
End With
Me.[subform_rapporten_vak].Form.Filter = strWhere
Me.[subform_rapporten_vak].Form.FilterOn = True
einde:
Stagecontrole
end sub
Stagecontrole is the name of a module:
Public Function Stagecontrole()
Me.Invulstage = "Ja"
Me.Bijschrift69.Visible = True
Me.Stage.Visible = True
Me.stage_ZG1.Visible = True
Me.stage_ZG2.Visible = True
Me.stage_G1.Visible = True
Me.stage_G2.Visible = True
Me.stage_V1.Visible = True
Me.stage_V2.Visible = True
Me.stage_OV1.Visible = True
Me.stage_OV2.Visible = True
Me.stage_GN1.Visible = True
Me.stage_GN2.Visible = True
Me.S_opmerking.Visible = True
End Function
When I click on "keuzelijst0" I get an errormessage saying (and now I have
to translate)
a variable or procedure is expected, not a module
The message appears on the line with "Stagecontrole"
What am I doing worng?
Whe I put the function-code in the code of the form itself it works perfect
but not when I create a seperate module.
Thanks for your kind help.
JP
I am struggeling with programming a module.
I wrote:
Private Sub Keuzelijst0_Click()
On Error GoTo einde
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE Patienten SET Patienten.punten = False WHERE
Patienten.punten=True;"
DoCmd.SetWarnings True
Me!LK = Me!Keuzelijst0
Me!Periode = Empty
Me!ll = Empty
Me!Vak = Empty
Dim strWhere As String
With Forms![rapporten ingeven]
strWhere = "([lk])='" & Forms![rapporten ingeven]![Keuzelijst0] &
"'"
End With
Me.[subform_rapporten_vak].Form.Filter = strWhere
Me.[subform_rapporten_vak].Form.FilterOn = True
einde:
Stagecontrole
end sub
Stagecontrole is the name of a module:
Public Function Stagecontrole()
Me.Invulstage = "Ja"
Me.Bijschrift69.Visible = True
Me.Stage.Visible = True
Me.stage_ZG1.Visible = True
Me.stage_ZG2.Visible = True
Me.stage_G1.Visible = True
Me.stage_G2.Visible = True
Me.stage_V1.Visible = True
Me.stage_V2.Visible = True
Me.stage_OV1.Visible = True
Me.stage_OV2.Visible = True
Me.stage_GN1.Visible = True
Me.stage_GN2.Visible = True
Me.S_opmerking.Visible = True
End Function
When I click on "keuzelijst0" I get an errormessage saying (and now I have
to translate)
a variable or procedure is expected, not a module
The message appears on the line with "Stagecontrole"
What am I doing worng?
Whe I put the function-code in the code of the form itself it works perfect
but not when I create a seperate module.
Thanks for your kind help.
JP