473,836 Members | 1,256 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 4784
Rabbit
12,516 Recognized Expert Moderator MVP
You can just sort by the department number.
Nov 21 '11 #2
NeoPa
32,584 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, 1420 views)
Nov 21 '11 #4
NeoPa
32,584 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
6609
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 again has 3 columns with b1,b2,b3,b4 and like before, b1,b2 and b4 form the primary key. All columns are of the same datatype in both tables. Now I want to get rows from table A which are not present in table B. Whats the best way of doing this?
7
2467
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 filled (with Now()) and the purchase date is entered manually. Meantime I became aware that instead of Now() I should use Date() for the date
1
10526
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 Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
1
2160
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 fields in it. However, I can not find any examples of how to keep the data insync between the query and the table. I do have it working through controls but that is not the ideal situation. Are there any examples ordo you have any suggestions.
1
1798
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, "", "" end sub qryResultsReport
2
1366
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
10319
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 sequence not supported by operating system" Private Sub Command1_Click() Dim search As String Dim index As Integer search = keybatch.Text
1
2626
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 >= current date. Otherwise, user have to waste time to page up the pages to find the current date 2. I got a script of simple calendar from the web that use mktime() to create links on the calendar Task I need to let user view data earlier than...
2
4822
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 table names might include "SomeTable1" or "SomeTable236" etc... Unfortunately when I try to use something like "from SomeTable + MyChangingNumber.ToString() in..." in my from clause it does not work. How can I set this up to use a range variable...
2
4453
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 that = 50%, = 80%, and = 90%. I will check in the report against (from the query, but currently stored in a text box on the report via a Dlookup - textbox name is still ). If is less than then I want to compare the value of (another report...
0
9660
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10535
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9365
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7778
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6976
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5645
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5815
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4446
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 we have to send another system
2
4005
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.