Update Query - I can't count

muster101

New Member
Joined
Mar 14, 2002
Messages
13
Greetings,

Sorry for the novice questions but....

I have 2 tables that I have joined on a field 'npanxx'

The 1st table has one unique occurance of each 'npanxx'
The 2nd table has multiple occurances of each 'npanxx'

I have a field in table1 that I want to populate with the count of occurances of 'npanxx' in table 2


table1
'npanxx' 201201

table2
'npanxx' 201201
'npanxx' 201201

the field i then want to update in table1
'count' 2

I have tried this thru the design update query method and just don't get it !

Secondly, it's probably obvious this is new to me and i doubt i even qualify as 'beginner'. Any suggestions for a book I could get that would best help me with learning Access?

Thanks for any help!
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Its simple to get the "Count"of npanxx in table 2

Just create a query, add the field npanxx Twice to the query. Click on the toolbar on the sum icon (it looks like a big letter E), then look back where the second field is, where is says grouped, click on their and change the criteria to Count. So you will have 1 that says grouped and another that says count. Run the query it will give you the result you are looking for.

I have to think about how you'll get this result to table one, but why would you want to do that?
 
Upvote 0

Forum statistics

Threads
1,221,531
Messages
6,160,357
Members
451,642
Latest member
mirofa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top