Hey everyone,
I am trying to get this stubborn button to work. It works on the sample database that came with the Access 07 bible, but for some odd reason, it wont work on mine... I copy/pasted the code, changed everything accordingly, but somehow it still doesn't work. I am stuck. can anyone elaborate? am I going about this the right way?
Note: I do have an Email field in my form. I also have a "Client Email" field that is where I want this button to email.
below is the code I currently have on the button:
Option Compare Database
Option Explicit
Private Sub cmdContact_Click()
Call AddContact( _
Me.Client, Me.LastName, Me.Address, _
Me.City, Me.State, Me.PostalCode, Me.Email)
End Sub
Private Sub cmdEmail_Click()
Call SendEmail(Me.Email)
End Sub
Private Sub Email_Change()
Call HandleEnabling(Me.Email.Text, Me.Client)
End Sub
Private Sub Client_Change()
Call HandleEnabling(Me.Email, Me.Client.Text)
End Sub
Private Sub Form_Current()
Call HandleEnabling(Me.Email, Me.Client)
End Sub
Private Sub HandleEnabling( _
varEmail As Variant, varClient As Variant)
cmdEmail.Enabled = Len(varEmail & "") > 0
' cmdContact.Enabled = Len(varClient & "") > 0
End Sub