J
JOM
I would like to update email address as follows
First Name= John A. or John
Last Name = Smith
Email = (e-mail address removed) or (e-mail address removed)
This is how my code looks like:
************************************************************
Dim lngID As Long
Dim strEmail As String
Dim strSQL As String
Const q As String = "'"
lngID = Nz(Me.[YourID],0)
strEmail = Replace(Nz([FirstName],"x"), " ","") & "."
strEmail = strEmail & Replace(Nz([LastName],"x"), " ","")
strEmail = strEmail & ""@Company.com"
strSQL = "UPDATE tblEmployee SET [EmailAdd] = " & q & strEmail & q
strSQL = strSQL & " WHERE [YourID]=" & lngID
CurrentDB.Execute strSQL, dbFailOnError
Me.txtEmail.Requery
First Name= John A. or John
Last Name = Smith
Email = (e-mail address removed) or (e-mail address removed)
This is how my code looks like:
************************************************************
Dim lngID As Long
Dim strEmail As String
Dim strSQL As String
Const q As String = "'"
lngID = Nz(Me.[YourID],0)
strEmail = Replace(Nz([FirstName],"x"), " ","") & "."
strEmail = strEmail & Replace(Nz([LastName],"x"), " ","")
strEmail = strEmail & ""@Company.com"
strSQL = "UPDATE tblEmployee SET [EmailAdd] = " & q & strEmail & q
strSQL = strSQL & " WHERE [YourID]=" & lngID
CurrentDB.Execute strSQL, dbFailOnError
Me.txtEmail.Requery