[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Send Database fields displayed in form via an email

Posted on 2013-05-21
1
Medium Priority
?
456 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 54

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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
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.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

650 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