E
Eric
I'm getting runtime error 2185 that I can't ref a control that doesn't have
the focus when I do the following:
Private Sub FirstName_Change()
SetEmail
End Sub
Private Sub SetEmail()
If (isTextBoxEmpty([EmailAddress])) And _
(Not isTextBoxEmpty([FirstName])) And _
(Not isTextBoxEmpty([LastName])) _
Then
Dim s As String
s = LCase$(Left$([FirstName].Text, 1)) & _
LCase$([LastName].Text) & _
"@wynnlasvegas.com"
Me.EmailAddress = s
End If
End Sub
Private Function isTextBoxEmpty(ByVal aBox As TextBox) As Boolean
If IsNull([aBox]) Or [aBox].Text = "" Then
isTextBoxEmpty = True
Exit Function
End If
isTextBoxEmpty = False
End Function
Any help much appreciated,
Eric
the focus when I do the following:
Private Sub FirstName_Change()
SetEmail
End Sub
Private Sub SetEmail()
If (isTextBoxEmpty([EmailAddress])) And _
(Not isTextBoxEmpty([FirstName])) And _
(Not isTextBoxEmpty([LastName])) _
Then
Dim s As String
s = LCase$(Left$([FirstName].Text, 1)) & _
LCase$([LastName].Text) & _
"@wynnlasvegas.com"
Me.EmailAddress = s
End If
End Sub
Private Function isTextBoxEmpty(ByVal aBox As TextBox) As Boolean
If IsNull([aBox]) Or [aBox].Text = "" Then
isTextBoxEmpty = True
Exit Function
End If
isTextBoxEmpty = False
End Function
Any help much appreciated,
Eric