G
Guest
I have a form that shows an e-mail address and a seperate button to click to
send a message to that e-mail address. The problem is, sometimes users
haven't entered an e-mail address and I dont want the button to even appear,
thus set its visible and enabled properties to false, but my code isn't
working... here is what I have now where the field is called EMail and the
button is named Link. This is in the Form OnOpen Event and yields a 424
'Object Required' error when I try to open.
If [Forms]![frmPositions]! Is Null Then Me.Link.Enabled = False
I used to have the following:
Private Sub Form_Open(Cancel As Integer)
If Me.Email = "" Then GoTo NoMail
NoMail:
Me.Link.Enabled = False
End Sub
But that did nothing... I tried the code in both the OnOpen and OnLoad
properties and got the same results... any suggestons?
send a message to that e-mail address. The problem is, sometimes users
haven't entered an e-mail address and I dont want the button to even appear,
thus set its visible and enabled properties to false, but my code isn't
working... here is what I have now where the field is called EMail and the
button is named Link. This is in the Form OnOpen Event and yields a 424
'Object Required' error when I try to open.
If [Forms]![frmPositions]! Is Null Then Me.Link.Enabled = False
I used to have the following:
Private Sub Form_Open(Cancel As Integer)
If Me.Email = "" Then GoTo NoMail
NoMail:
Me.Link.Enabled = False
End Sub
But that did nothing... I tried the code in both the OnOpen and OnLoad
properties and got the same results... any suggestons?