#  Other Applications & Softwares  > Access Tables & Databases >  >  Count Records based on Combo box values

## excelkeechak

hi all,
   i had a form with a combo box showing the employees in the combo box.

Basing on the combo box values i want to show the count of records in a text box named COUNTRECORDS.

please tell me.

----------


## davesexcel

Hi,
This will populate the ComboBox with items in range(L2:L6) when you Show the UserForm.

Select an item from the ComboBox and the Counted items From Column A will show in the textbox

----------


## excelkeechak

Thanks for the reply sir..

But i want the same in ACCESS.Please help me.

----------


## davesexcel

Woops, my mistake, I didn't even notice this was an Access question.

I have dabbled in Access, and know if you highlight a specific item and hit the Filter Icon, it will give you the count of that item. I haven't work enough with Access to to include UserForms.

----------


## split_atom18

If I am understand you correctly you are looking for the following:




```
Please Login or Register  to view this content.
```



Hope this helps,

Dan

----------


## excelkeechak

Thanks for the Code.I will Check it out and reply back.

----------


## split_atom18

Just for clarification this code is going to need to be manipulated to to whatever recordset you want to query, it won't do exactly what you want in its current state.

One other thing to note:
If you aren't that familiar with SQL:




```
Please Login or Register  to view this content.
```



If the field you are referencing is a String vs a Number, then you need to use the bottom one.

Hope this helps,

Dan

----------

