Hi, I need to change my Macro to VBA code, but I'm wrong somewhere. So I have this Macro on my command button "cmd_1":
UG Added Code Tags
UG Added Code Tags
Code:
SetTempVar
Name: temVarLaboratory
Expression: [LaboratoryID]
OpenForm
FormName: sub_Indicators
Where condition = [LaboratoryID]=[TempVars]![temVarLaboratory]
'That is the Macro code who I use and it works well, but I need to write in VBA code,
'because I want to add a few more things:
If Me.txt_HM= 0 Then
MsgBox "Please tick checkbox"
Me.txt_HM.SetFocus
Cancel = True
Exit Sub
End If
Last edited by a moderator: