display ad hoc query results 
Author Message
 display ad hoc query results

I need to display the results of an ad hoc select query on the screen.  I
was thinking that there was something similar to docmd. opentable or
docmd.openquery, but both require objects that already exist in the
database.  I can create a temporary object, append it to my querydefs
collection, but I'd rather not.

Does anyone have a suggestion?



Tue, 09 Oct 2001 03:00:00 GMT  
 display ad hoc query results
Just a thought:

If you created a datasheet form, then you could set its recordsource property
to a SQL statement.



Tue, 09 Oct 2001 03:00:00 GMT  
 display ad hoc query results
Your only alternative (without creating a temp query/table object) would be
to open a recodset on the ad hoc query and manually (in code) display the
results: add them to a list box, grid, text field (if small results), memo
field, output to a text file and show in Note Pad, output to Excel/Word,
etc.

All slower, much more work if you do not want to display in a datasheet for
some reason.

Hope this helps,
GR

Quote:

>I need to display the results of an ad hoc select query on the screen.  I
>was thinking that there was something similar to docmd. opentable or
>docmd.openquery, but both require objects that already exist in the
>database.  I can create a temporary object, append it to my querydefs
>collection, but I'd rather not.

>Does anyone have a suggestion?



Wed, 10 Oct 2001 03:00:00 GMT  
 display ad hoc query results
Hi,

The best way is to use a listbox or a subform so that you can set it's
RecordSource to the generated SQL.

Here's one sample, although it'll be updated shortly. (to provide SaveAs
external file capabilities on the generated SQL).

< http://home.att.net/~dashish/forms/frm0045.htm >

HTH
--
Dev Ashish (Just my $.001)
---------------
The Access Web ( http://home.att.net/~dashish )
---------------


: I need to display the results of an ad hoc select query on the screen.  I
: was thinking that there was something similar to docmd. opentable or
: docmd.openquery, but both require objects that already exist in the
: database.  I can create a temporary object, append it to my querydefs
: collection, but I'd rather not.
:
: Does anyone have a suggestion?
:
:



Wed, 10 Oct 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Ad hoc query/query builder

2. Ad-hoc Query Toolkit

3. ad-hoc query building component.

4. creating reports from ad-hoc queries

5. ad-hoc query building component.

6. How do you build an ad-hoc query?????

7. ad-hoc query builder/report writer

8. Designing COM database objects to handle ad-hoc queries

9. Ad Hoc Report Generator

10. ActiveReports, adding page to ad hoc rpt

11. Creating Ad-Hoc Report at run-time?

12. Creating Ad-Hoc Report at run-time?

 

 
Powered by phpBB® Forum Software