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

Export Qry to a NEW Access Database

Status
Not open for further replies.

deadhead7

Programmer
Apr 18, 2003
57
US
How do you export a qry to a table in a New non existant database(.)(.)
 
probably not exactly what you're looking for, but you could always just create a blank database and export your query to that (you can even drag and drop it into an existing one, i just don't think you can move it and create the database it's being moved into at the same time). by the way, why move a query into a blank database, aren't they generally dependant on having tables and data to search, sort, and modify?
 
sorry I mean the qry results to a table in a new database, that doe not exist yet. This is for a bunch of people using a dbase on a network. I want it to create a new dbase on their pc's, and lot clutter the master db
 
that makes a little more sense...

you could create the database on each of their computers as part of the setup process for using the db, or use vba to check upon opening the database to see if a database exists in the folder you specify - and create one if one does not (look for info on the filesystem object, accessed as "Scripting.FileSystemObject" through the CreateObject method). then you could write more code to export the result sets of your queies as tables to these databases.

i think you could also just make text or excel files of them, if the users want just the isolated reports

if the tables the queries are fed by are time invariant, or at least aren't subject to continual data removal and provide some sort of field to identify new records (like a date stamp) you could avoid saving the queries at all, and just ask for a time window when your users run them. if your sql is well designed and your database isn't absolutely huge, this shouldn't hold anybody up for too long and would avoid any storage/synchronization problems with archiving old query results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top