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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

viewing a resultset in access and ado command

Status
Not open for further replies.

krankyboy

Programmer
May 27, 2003
4
IN
Hi,

I have an application that allows a user to choose a query from a dropdown and select certain date parameters in order to generate a resultset which will need to be copied and pasted to Excel.

I can do this easily with a DAO querydef but how do I do this with ADO and a command object. I need the user to see the results after the query runs???

Thanks,

Andrew
 
See details of thread705-1244830 on how to view the results of an ADO command.

I open the form in form view. On that form are textboxes used to enter the parameters.
The user clicks the "View Data" button. This builds the command object, passes the parameters through to the SP (or whatever).
It then switches the form into Datasheet view, which the user can view the data just as if it were a pass through query with the same facilities as if a query were open on screen (eg sort by field, filter etc).

You have to make sure there's a textbox on the form for every field needed in the resultset (just set the Visible property to false for any that you don't want the users to see initially).

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top