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

Excel queries

Status
Not open for further replies.

Trekk

Programmer
Aug 16, 2001
66
US
I have an excel worksheet that has about 10 rows of data I need to populate from several access queries. I can assign a query through the wizard for the first row and it works. But I don't have the option to assign a new query to the same column in a new row. all it allows me to do is edit the first one.

each row in the column gets its data from a different query in the access database.

is there a way to assign different queries to different rows.

Thanks
 



Hi,

"...from several access queries..."

Why can't you JOIN the data from all your queries in a single UNION query?

Pleae post your several queries if you need help.

Skip,

[glasses] [red][/red]
[tongue]
 
Hi Skip
I may be approaching this ting all wrong as it is.

What our users do is run queries in a database like total new customers for the month as one of the queries. They then look at the end of the access datasheet and it may say 20 records for example. They then input that into an excel spreadsheet they created. The excel sheet has several rows of different data that is gathered from different queries the same way as above.

I was asked if I can have the queries automatically fill in the totals for each row in the excel spreadsheet.

They only way I know or tried to do it was to do the data import and connect to the access queries already created. But excel will only allow me to set one query per column. However all the rows in the column will be populated by different queries?

The rows and columns are static they wont change so they query for example would always populate A3 for example. And another query would populate B3 etc

The queries are simple enough here is one example of a query I have

SELECT tblParolee.ParoleeID, tblParolee.LastName, tblParolee.FirstName, tblParolee.ReferalSource, tblParolee.ReleaseDate
FROM tblParolee
GROUP BY tblParolee.ParoleeID, tblParolee.LastName, tblParolee.FirstName, tblParolee.ReferalSource, tblParolee.ReleaseDate
HAVING (((tblParolee.ReleaseDate) Is Null));
 


Code:
SELECT ParoleeID, LastName, FirstName, ReferalSource, ReleaseDate
FROM tblParolee
Where ReleaseDate Is Null

UNION

SELECT ParoleeID, LastName, FirstName, ReferalSource, ReleaseDate
FROM [b]SomeOtherTable[/b]
Where ReleaseDate Is Null

UNION

SELECT ParoleeID, LastName, FirstName, ReferalSource, ReleaseDate
FROM [b]YetAnotherTable[/b]
Where ReleaseDate Is Null

Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top