Saving a quiry to a disc for forwarding other than by e-mail

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

I would like to save a query on a floppy to send to
someone else to reproduce using his copy of Access. Is
this possible? I have been unable to discover where the
queries are saved when looking for them. They seem to be
available only through the program.
 
Joe said:
I would like to save a query on a floppy to send to
someone else to reproduce using his copy of Access. Is
this possible? I have been unable to discover where the
queries are saved when looking for them. They seem to be
available only through the program.


Here's an example of how to get hold of the SQL of a query. Replace
"Debug.Print" with a file write, or whatever. Replace the InputBox with a
list of QueryDef names, or whatever.


Public Sub ShowQueryDefSQL()

Dim db As DAO.Database
Dim qds As DAO.QueryDefs
Dim qd As DAO.QueryDef

Set db = CurrentDb()
Set qds = db.QueryDefs
Set qd = db.QueryDefs(InputBox("Enter Query Name", "Query Name Entry
Form"))

Debug.Print qd.Name
Debug.Print qd.SQL

Set qd = Nothing
db.Close
Set db = Nothing

End Sub
 
Do you want to save the QUERY statement or the results returned?

You can save the statement by switching to the SQL view, and copying the
statement. Then you can paste the statement to any text file and ship that.

The other person can open there copy of Access, create a new query with no
tables selected, switch to the SQL view and paste the text into the SQL view.
 
You're correct, they are in the program. You can switch to the SQL view and copy/past the text, or send him the mdb
 
Back
Top