473,408 Members | 2,405 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,408 software developers and data experts.

count in combobox

Dears,

Can you tell me how to apply count function on a combo box in a query?
for example i have table with a drop down field named Programs and it
consists (under graduate, graduate, post graduate) i want to count the
under graduate records based on the above mentioned combo box.

Can I do it so?

Naweed

Jun 10 '07 #1
1 3203
Dear Your Highness:

Assuming your combobox is on a form named Prince, the name of your combobox
is TheRoyalCombobox, the rowsource of your combobox is a value list of under
graduate, graduate and post graduate and the name of your table is
TheRoyalTable, use:

CountOfRecords = DCount("*","TheRoyalTable","[Programs] = '" &
Forms!Prince!TheRoyalCombobox & "'")

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
re******@pcdatasheet.com



<ki*********@gmail.comwrote in message
news:11*********************@q66g2000hsg.googlegro ups.com...
Dears,

Can you tell me how to apply count function on a combo box in a query?
for example i have table with a drop down field named Programs and it
consists (under graduate, graduate, post graduate) i want to count the
under graduate records based on the above mentioned combo box.

Can I do it so?

Naweed

Jun 10 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
1
by: Chris Wolfe | last post by:
I have two fields that draw their combobox values from the same table. LogBook04.Insurance is the Primary Insurance and LogBook04.SecIns is the Secondary Insurance. Both draw their values from...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
3
by: VaNTa | last post by:
hello I have a small problem with combobox. i wonder if there is an event which fires when members of Items collection change?. For example this event should fire when i add or delete an item,...
1
by: anonymous | last post by:
I've been trying to put a them, please help me out. Here's the major parts of my code: public Form1() { DataSet myDataSet = new DataSet("myDataSet"); DataTable testTable = new...
3
by: TT (Tom Tempelaere) | last post by:
Hay there, I'm writing my own DataGridComboBoxColumn because .NET 1.1 does not have one (I hope .NET 2.0 supplies one). I based it on this article:...
3
by: Bernie Hunt | last post by:
I have a combo box on a form. It's entries are loaded from a database. Once the box is loaded, is there a way to ask it how many items it has? Or should I just count the number of items added and...
2
theaybaras
by: theaybaras | last post by:
Hi all, I have a table and a subtable . CAssessments is a combobox that looks up a table called AssessList has 2 columns, an autonumber PK and a string for the title of the Assessment. ...
11
by: Beany | last post by:
Hi, Can some please provide me with the code for counting records in a subform and displaying it in a textbox? Does this code go into the control source of the textbox? My subform is called...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...
0
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
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
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
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...

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.