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
Solved

Send Database fields displayed in form via an email

Posted on 2013-05-21
1
433 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
1 Comment
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

828 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