Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Queries to report

Author  Topic 

bazz
Starting Member

26 Posts

Posted - 2004-01-10 : 10:16:33
Hi

I'm having troubles with generating a report in access. Basically i have about 100 queries, which i would like to diplay on a single report. Each query is a count, but i can't seem to bind the queries result toa text box.

Can someone please give me a pointer cheers

bazz

bazz
Starting Member

26 Posts

Posted - 2004-01-10 : 10:30:44
Can you simply assign a query value to a text box???

cheers
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-01-10 : 12:57:38
why do you have 100 seperate queries? How many tables are involved? what is your data like?

- Jeff
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2004-01-11 : 01:58:40
If these are all coming out of one table, then what you probably should be doing is a GROUP BY whatever value you use to filter each separate query. Or if you've got just a few tables, then perhaps a query for each table with its GROUP BY and then another query the UNION those together into one result set.

Or, another way of doing it would be to use SUM and IIF such as
SELECT sum(iif(myField = thisValue,1,0)), sum(iif(Field2 = Value2, 1, 0)) FROM myTable

--------------------------------------------------------------
Find more words of wisdom at [url]http://weblogs.sqlteam.com/markc[/url]
Go to Top of Page

bazz
Starting Member

26 Posts

Posted - 2004-01-11 : 08:52:15
Thanks for the replies

Basically each feild in the table is field from a group of radio buttons or option button as they are called. The radio button gives the field a numeric value that represent either 'Yes', 'No', or 'Unavailable' i'm doing a report that counts how many yes's no's or unavailables appear.

Any more help would be great

thanks

bazz
Go to Top of Page

bazz
Starting Member

26 Posts

Posted - 2004-01-12 : 06:22:01
Hey AjarnMark

I tried using a union query and it seems to give me the answer i'm looking for. You can't format it the way i want though, but should be ok.

Thanks mate
Go to Top of Page
   

- Advertisement -