List Count

Posted on 2009-04-25
Last Modified: 2013-11-28
I set the RowSourc property of a list box to a query, and I would like to show the # of items in the list box.  When I run the query, at the bottom of the screen it show, for example, 110 as the results of the query.  How do I display that number when that query is the rowsource of the list box?
Question by:willis1970
    LVL 65

    Accepted Solution

    you can use the listcount property of the listbox

    say u had a label near the listbox called lblCount

    lblCount.caption = mylistbox.listcount

    can be applied to textboxs also, eg txtMyCount.value = mylistbox.listcount

    Author Closing Comment

    I should have a least tried that.  I have used the ListCount property many times before - just didn't realize it would work in this manner.  Thanks for your help..
    LVL 65

    Expert Comment

    No probs :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
    Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
    The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now