How to convert recordset of only PKs into full field recordset?

  • Thread starter Thread starter Bam Bam
  • Start date Start date
B

Bam Bam

Hi all,

I have generated a multi-row recordset who's only field
contains CandidateIDs (a sub set of the full list in the Candidates
table).

e.g

450
459
468
482
504
511

Now I want to make a new recordset (or query) with the same number of rows
but with all the
fields for each record as in the Candidates table. Anyone know how?

Regards,

Bam Bam
 
You can traverse the Recordset to construct a comma-separated list strList
of required CandidateID values like

450, 459, 468, 482, 504, 511

Then you can construct the SQL String required for the second Record using
something like:

strSQL = "SELECT * FROM tblCandidate AS C " & _
" WHERE C.CandidateID In (" & strList & ")"
 
Thankyou so much for your replies, they both look like they will do the
trick

But, how so you save a recordset as a query?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top