Can anyone please help I have a form when after checking is entered into an access 2000 database (See Code Below) which works fine. However I would then like to send the information entered into the database by email Cdonts.
<% 'insert into database & move to next page if there are no errors
'***************************************************************
If strErrorMsg = "" Then
strSQL = "SELECT * FROM tblappointments"
objRst.Open strSQL, objConn, adOpenDynamic, adLockOptimistic
objRst.AddNew
objRst("apptDay") = strapptDay
objRst("apptMonth") = strapptMonth
objRst("apptYear") = strapptYear
objRst("apptTime") = strapptTime
objRst("apptFNAdvisor") = strapptFNAdvisor
objRst("apptAdEmail") = strapptAdEmail
objRst("clientTitle") = strclientTitle
objRst("clientFirstName") = strclientFirstName
objRst("clientLastName") = strclientLastName
objRst("clientSubject") = strclientSubject
objRst("receptionistFirstName") = strreceptionistFirstName
objRst("bookingTime") = strbookingTime
objRst("bookingDate") = strbookingDate
objRst.Update
objRst.Close
objConn.Close
Set objRst = Nothing
Set objConn = Nothing
strErrorMsg = "User data entered into database successfully...<br>Please Email the Advisor about the Appointment"
End If
End If
%>
The email address it needs to be sent to is:
objRst("apptAdEmail") = strapptAdEmail
Many thanks in appreciation of your help