I
Ian
I'm a newb so this probably much simpler than I'm making it...
Background: I have a DB that collects a users name / info and some data,
then when the user finishes entering the data, I want to send an email with a
single line of text generated by concatenating a couple of fields from a
separate query. Sending the email part I have figured out, but I cant seem
to open the query and get what I need out of it.
For this thread, assume:
query name: Query1
query fields: First_Name, Last_Name, Data
query returns 1 row of data (i.e. newest addition)
How do I code an event (button click from a form) to run the query, then
send an email to an address with a line of text like "[John] [Smith] entered
this [Data]"
Here's what I have so far:
Private Sub Continue_Button_Click()
Dim msg_title, msg_text, rec_set
DoCmd.SendObject , , , "(e-mail address removed)", , , msg_title, msg_text, 0
End Sub
All help greatly appreciated!
-Ian
Background: I have a DB that collects a users name / info and some data,
then when the user finishes entering the data, I want to send an email with a
single line of text generated by concatenating a couple of fields from a
separate query. Sending the email part I have figured out, but I cant seem
to open the query and get what I need out of it.
For this thread, assume:
query name: Query1
query fields: First_Name, Last_Name, Data
query returns 1 row of data (i.e. newest addition)
How do I code an event (button click from a form) to run the query, then
send an email to an address with a line of text like "[John] [Smith] entered
this [Data]"
Here's what I have so far:
Private Sub Continue_Button_Click()
Dim msg_title, msg_text, rec_set
DoCmd.SendObject , , , "(e-mail address removed)", , , msg_title, msg_text, 0
End Sub
All help greatly appreciated!
-Ian