Greetings fellow access users. i am trying to close a form, from the on current event . i have the following code.
#If Me.NoFuthercontactdesired = "Never" Then
MsgBox " This client has requested not to be contacted."
'DoCmd.Close objectType:=acForm, ObjectName:=Me.Name
Exit Sub
Forms("Main Switchboard").SetFocus
End If#
The above does not close the current form as i am in event mode. Is there a work around ? i tried a public function , but that also causes an error .
I hope i have provided enough info for you to see what i am trying to achieve if more details are require i will provide . Any suggestion would be appreciated .
Regards Ypma
#If Me.NoFuthercontactdesired = "Never" Then
MsgBox " This client has requested not to be contacted."
'DoCmd.Close objectType:=acForm, ObjectName:=Me.Name
Exit Sub
Forms("Main Switchboard").SetFocus
End If#
The above does not close the current form as i am in event mode. Is there a work around ? i tried a public function , but that also causes an error .
I hope i have provided enough info for you to see what i am trying to achieve if more details are require i will provide . Any suggestion would be appreciated .
Regards Ypma