Emulate Datasheet View For Ad-hoc SQL?

M

MDW

I'm making a form that will allow users to select certain fields from a table, enter criteria, etc, and then create a recordset (using ADO) that I will then export to Excel. However, they may want to "preview" what they just picked before putting it into Excel. Is there some control or some way to view an ADO recordset in some facsimile of datasheet view
 
C

Chris Nebinger

Create a temporary query, and then open it:


On Error Resume Next
DoCmd.DeleteObject acQuery, "Temp"
DAO.CreateQueryDef "Temp", "Select * from MsysObjects"
DoCmd.OpenQuery "temp"



Chris Nebinger

-----Original Message-----
I'm making a form that will allow users to select certain
fields from a table, enter criteria, etc, and then create
a recordset (using ADO) that I will then export to Excel.
However, they may want to "preview" what they just picked
before putting it into Excel. Is there some control or
some way to view an ADO recordset in some facsimile of
datasheet view?
 
D

Duane Hookom

You might want to review the DH Query By Form at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane.

--
Duane Hookom
MS Access MVP


MDW said:
I'm making a form that will allow users to select certain fields from a
table, enter criteria, etc, and then create a recordset (using ADO) that I
will then export to Excel. However, they may want to "preview" what they
just picked before putting it into Excel. Is there some control or some way
to view an ADO recordset in some facsimile of datasheet view?
 

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

Top