473,322 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Access Quries

75
Hi all

Just have a question about Access Quries.
I want to create a query where I have to count the number of medication has been given on "PRIM_CARE" in the month of June. I have to archived this data from the files. so means I have 30 files, each for each day. Also, I have about 30 tables, again each table for each day.

So, my question is how to combine all the count together and have a report where it tells you the total count for each medication, and the grant total.

I can do it for one table, but not sure if we could add more than one table in the query, remember the field name in each table is the same. please take a look of my query, which works well for this day, and thanks for your time.

Expand|Select|Wrap|Line Numbers
  1. SELECT A060107A.Field7, Count(A060107A.Field7) AS CountOfField7
  2. FROM A060107A
  3. WHERE (((A060107A.Field1)="PRIM_CARE"))
  4. GROUP BY A060107A.Field7;
  5.  
Sep 27 '07 #1
1 1387
Scott Price
1,384 Expert 1GB
Why 30 tables? It sounds like a design issue to me. Have a read through this tutorial: Database Normalisation and Table Structures

As for a specific answer to your question, I don't think you'll have much luck with the table structure as you have it. You might be able to use a union query to stack all the tables into one returned recordset but you'd have troubles then breaking it down by date (as the date is the name of your table instead of more properly being a characteristic/field in another table)

Regards,
Scott
Sep 28 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

63
by: Jerome | last post by:
Hi, I'm a bit confused ... when would I rather write an database application using MS Access and Visual Basic and when (and why) would I rather write it using Visual Studio .Net? Is it as easy...
13
by: bill | last post by:
I am trying to convince a client that dotNet is preferable to an Access project (ADP/ADE). This client currently has a large, pure Access MDB solution with 30+ users, which needs to be upgraded....
1
by: Dave | last post by:
Hello NG, Regarding access-declarations and member using-declarations as used to change the access level of an inherited base member... Two things need to be considered when determining an...
13
by: Simon Bailey | last post by:
I am a newcomer to databases and am not sure which DBMS to use. I have a very simplified knowledge of databases overall. I would very much appreciate a (simplifed) message explaining the advantages...
0
by: Frederick Noronha \(FN\) | last post by:
---------- Forwarded message ---------- Solutions to Everyday User Interface and Programming Problems O'Reilly Releases "Access Cookbook, Second Edition" Sebastopol, CA--Neither reference book...
2
by: monozygotic1_2 | last post by:
I have a database that is built in Access 97 that was perorming quite well. After my company upgraded to SP2 it wreaked all kinds of havock, and I spent weeks resolving all the issues. A form that...
4
by: ashutoshvyas | last post by:
I am designing a data report in VB6. In data environment it is possible to selet tables and 'select quries'. But I want to generate a report based on parameters passed by user, so i had created a...
3
by: rengaraj | last post by:
hi frens I want to know some information/ explaination from SQL.. I want to know about join queries, subquries, timestamps, date_part, date_trunc, case and cast data type.. Do anyone...
3
by: santhosh1986 | last post by:
hi: To be honest i am just new to oracle..but i know little bit in mysql..so can anyone help me buy sending basic quries and also describtion abt the editors used for quries..and also what is the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.