B
Beth Eadie
I have a single table in my database containing school names, usernames, and
password for user accounts. I am trying to find an easy way of exporting out
the data into an Excel spreadsheet, using 1 tab for each school.
Now, I have the code for a make table query which works perfectly. Example
code:
SELECT [School Name], [Student ID], [Password]
INTO [Excel 8.0;Database=C:\StudentIDs.xls].EDS
FROM [DPS STUDENT]
WHERE [School Name]="Edison";
SELECT [School Name], [Student ID], [Password]
INTO [Excel 8.0;Database=C:\StudentIDs.xls].WOW
FROM [DPS STUDENT]
WHERE [School Name]="World of Wonder";
My question is....is there a way to combine this code together in one single
query so that I don't have 20+ queries in this database (we have 20+ schools
in the district). I know I can create the queries and have them all run from
a macro, but I would like to know if there is a simpler way of doing this.
Any help is greatly appreciated.
Thanks,
Beth
password for user accounts. I am trying to find an easy way of exporting out
the data into an Excel spreadsheet, using 1 tab for each school.
Now, I have the code for a make table query which works perfectly. Example
code:
SELECT [School Name], [Student ID], [Password]
INTO [Excel 8.0;Database=C:\StudentIDs.xls].EDS
FROM [DPS STUDENT]
WHERE [School Name]="Edison";
SELECT [School Name], [Student ID], [Password]
INTO [Excel 8.0;Database=C:\StudentIDs.xls].WOW
FROM [DPS STUDENT]
WHERE [School Name]="World of Wonder";
My question is....is there a way to combine this code together in one single
query so that I don't have 20+ queries in this database (we have 20+ schools
in the district). I know I can create the queries and have them all run from
a macro, but I would like to know if there is a simpler way of doing this.
Any help is greatly appreciated.
Thanks,
Beth