Question : RecordSet to Table - Access

I need some help dumping a recordset into a temporary table to be displayed in Access.  Is this possible?

VBA code is used to perform a stored parameter query.  The code is attached below.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
Private Sub Calendar0_DblClick()
 
'''Declare Variables
Dim qdf As DAO.QueryDef
Dim rst As Recordset
 
'''Get stored parameter query
Set qdf = CurrentDb.QueryDefs("WinnersQuery")
 
'''Fill in the parameters with the correct value
qdf.Parameters(0) = Calendar0.Value
 
'''Perform the query
Set rst = qdf.OpenRecordset
 
 
'''Send recordset data to temp table (***Need help here!***)
 
 
rst.Close
qdf.Close
Set rst = Nothing
Set qdf = Nothing
 
End Sub
Open in New Window Select All

Answer : RecordSet to Table - Access

Unless you need the rs for other reasons, this is overkill.
Just create a make table query which does the same selection as WinnersQuery.
For the selection criteria use a reference such as...
Forms!yourformname!calendar0.value
which picks up the value from your calendar form.
Then you can run the query in code or by pressing a button or whatever.
Random Solutions  
 
programming4us programming4us