Smokeeater
Registered User.
- Local time
- Yesterday, 22:10
- Joined
- Jan 15, 2009
- Messages
- 58
I have code tied to a command button on a subform, however, it is both lengthy and needs to be used in multiple locations (OnOpen, On Current, etc.). I would like to use a module instead, however, the code "hangs up" on each of the control names. I have tried to use the ME! and Me. identifier, but same issue.
Also, since this code is used in a module, do I need to link the control names back to the subform it is being used on?
Function Team2_Hide()
Dim iResponce As Integer
iResponce = MsgBox("Do you wish hide the Team 2 fields?", vbYesNo, "TEAM 2 HIDE")
If iResponce = vbYes Then
DoCmd.Echo (False)
Saf_Cross_UTD2.Visible = False
Saf_Open__Concerns2.Visible = False
Saf_Kaizen_Present2.Visible = False
Saf_Associate_Participation2.Visible = False
Saf_Assoc_BuyOff_DateCompleted2.Visible = False
Saf_Proper_Layout2.Visible = False
more code......
Also, since this code is used in a module, do I need to link the control names back to the subform it is being used on?
Function Team2_Hide()
Dim iResponce As Integer
iResponce = MsgBox("Do you wish hide the Team 2 fields?", vbYesNo, "TEAM 2 HIDE")
If iResponce = vbYes Then
DoCmd.Echo (False)
Saf_Cross_UTD2.Visible = False
Saf_Open__Concerns2.Visible = False
Saf_Kaizen_Present2.Visible = False
Saf_Associate_Participation2.Visible = False
Saf_Assoc_BuyOff_DateCompleted2.Visible = False
Saf_Proper_Layout2.Visible = False
more code......