473,507 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Roll up query or table

30 New Member
Hello,
I would like to create a table that will roll up Employee #s to corresponding Department #s. I currently have one table with all the data but would like to create a table that shows each Deparment # record and all subrecords with employee #s under it (group by, list?) Is there a way to do it via query?
Thank you.
Nov 21 '11 #1
5 4764
Rabbit
12,516 Recognized Expert Moderator MVP
You can just sort by the department number.
Nov 21 '11 #2
NeoPa
32,557 Recognized Expert Moderator MVP
It sounds like you're looking for a subform or subreport. Your table structure seems to be like a spreadsheet rather than a database though. Have a look at Database Normalisation and Table structures.

You should also understand that a table is a definition of the data as well as where that data is stored. By their very definition, they are not able to store data of different structures.
Nov 21 '11 #3
Yoni Hasid
30 New Member
Thank you. I wanted to clarify. I would like for my table to look like the one on the attached image.

Attached Images
File Type: jpg Rollup table.jpg (30.2 KB, 1416 views)
Nov 21 '11 #4
NeoPa
32,557 Recognized Expert Moderator MVP
But what you see there is not a table as such Yoni. It's two linked tables that, because of their linkage, Access knows how to display in that fashion.

Essentially it's the sort of thing you you can achieve with a subform on a form (as I mentioned in post #3).
Nov 22 '11 #5
Yoni Hasid
30 New Member
Thank you this is helpful !
Nov 28 '11 #6

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

Similar topics

6
6593
by: dummie_q | last post by:
Hey, I am having some confusion about how to formulate this particular query. I have 2 tables. Table A has 4 columns say a1,a2,a3,a4 with the columns a1,a2,a4 forming the primary key. Table B...
7
2428
by: Nicolae Fieraru | last post by:
Hi All, I have a table tblProducts where I have four fields:\ Index, ProductName, EnterDate (as Date/Time - Medium Date), PurchaseDate (Date/Time - Medium Date) The EnterDate is automatically...
1
10484
by: Michel Rousseau | last post by:
I have created a table through a query. How can I create a new query which will create the exact same table but rename some of the field names? Thanks. Michel Rousseau *** Sent via...
1
2144
by: fhiemstra0507 | last post by:
Hi I have a listbox that is based upon a query. This query is sorted by PetName and has the PetID and the PetName field in the query. It is based upon this table Pets which obviously has this...
1
1780
by: colleen1980 | last post by:
There is a form where it ask the two dates and then run a query then report. Private Sub Command36_Click() DoCmd.OpenQuery "qryResultsReport" DoCmd.OpenReport "rpt_TopTen", acPreview, "", ""...
2
1358
by: MikeSA | last post by:
Hi Probably simple, please help: Printing a query does not pull through the underlying data from the table, or the calculation rsults in the query? Please some advice.. MikeSA
5
10285
by: sansann | last post by:
Hello there! i need help on loading data from my Access database query table name combine into my MSFlexgrid select by batchno category. when i runn below coding the error said "Selected collating...
1
2606
osward
by: osward | last post by:
Hi everyone, Background 1. I have a table that consits 400+ rows of data and is growing by day. The table already has paging links at the bottom but I restricted to display rows of data only >=...
2
4788
by: Joey | last post by:
I am querying a DataSet with LINQ. I am running into a problem when trying to construct my query because in the "from" clause I do not know the table name (range variable) until runtime. Possible...
2
4431
by: emckesso | last post by:
Hello, I need to create conditional formatting of a text box in the detail section of a report. The formatting is based on multiple parameters that are stored in a query. For example, pretend...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7034
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1544
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.