?
Solved

Send Database fields displayed in form via an email

Posted on 2013-05-21
1
Medium Priority
?
452 Views
Last Modified: 2013-05-22
I am trying to send data from a database displayed with a form via an email. The database connection is to an MSAccess database.

default.asp - user selects a location and is redirected to
EligibleOrNot.asp. Based on a check in the database, the use is either redirected to:

NotEligible.asp (message displayed with guidelines) OR

Eligible.asp. In addition to the form fields, the user is given some information stored in the database (tblWeb.SSLink) and (tblStaffDirectory.SDFName, tblStaffDirectory.SDLName, tblStaffDirectory.SDEmail). Once the form is complete, the user clicks the submit button. The form data is transferred to Eligible2.asp. The form data is sent to a database AND sent via an email. I have this functioning correctly.

I now need to send the database data (tblStaffDirectory.SDFName, tblStaffDirectory.SDLName, tblStaffDirectory.SDEmail) included in the email.
Eligible.txt
Eligible2.txt
0
Comment
Question by:Malloy1446
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 total points
ID: 39186607
It looks like you are using the variable ChartID on Eligible.  Just put that as a hidden field in the form (or cookie or session or url).  Then on Eligible2, add back the recordset.
sql = "SELECT tblStaffDirectory.SDLName, tblStaffDirectory.SDFName, " & _
		"tblStaffDirectory.VRContact, tblStaffDirectory.VRAlternate, tblStaffDirectory.SDEmail " & _
		"FROM tblStaffDirectory WHERE ChartID=" & ChartID & ";"

Open in new window

Or you can add the those fields on the Eligible form and read them on Eligible2.  

Now you have multiple ways to get the data to your email script.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question