Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with NextRecordSet method

Status
Not open for further replies.
Sep 25, 2002
159
US
Hi everyone,

I came across the NextRecordSet method and I think it may help me but I'm not sure. I am trying to produce an email that sends a summary of links to users, but the groups of links are going to come from different tables. I am currently able to query the data and put it in an email from one table just fine. But I was hoping to possibly use the NextRecordSet method to produce an email like this:

Finland Actions
action 1
action 2
etc.
Barcelona Actions
action 1
action 2
etc.
ETC....

Below is my SQL (that is not working):

MySQL = "SELECT [Issue ID] AS theID FROM FinlandActions WHERE [Assigned To] = '" & UserName & "'""; SELECT [Issue ID] AS barcID FROM BarcelonaActions WHERE [Assigned To] = '" & UserName & "';"

I have not attempted the .NextRecordSet syntax because my SQL is incorrect and I don't know if it would solve my problem because I;ve never used it.

Thanks,
 
You may consider an UNION query.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 

MySQL = "SELECT [Issue ID] AS theID FROM FinlandActions WHERE [Assigned To] = '" & UserName & "'" & "; SELECT [Issue ID] AS barcID FROM BarcelonaActions WHERE [Assigned To] = '" & UserName & "';"

I made a slight change.

Do a display on MySQL to see if the string is formatted correctly.

Debug.Print MySQL
and then do Control G to look at the string.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top