Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Mar 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Remove blank space from combo box (97/SR-2)

    Hi all,

    This is not a critical problem, but kind of annoying! I have a combo box on a form. It contains sorted ID numbers and is used to search for records.

    For some reason, if I scroll down to the bottom, there is a large amount of blank space. I would really like to remove it. I don't know why it is there, because there are no blank fields when I run the query. I haven't had this problem with other combo boxes.

    Also, the combo box is not displaying all the ID numbers. It is missing about the last 30% of IDs.

    Has anybody seen this before? Any advice on how to fix it?

    Thanks,
    Erica.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Remove blank space from combo box (97/SR-2)

    How many rows are you trying to display in the combobox? If the number if very large, Access doesn't bring back all the values in the first pass. I assume the rowsource is a query or select statement, so post the SQL for it so we can see if the problem is the way you constructed the rowsource.
    Charlotte

  3. #3
    New Lounger
    Join Date
    Mar 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove blank space from combo box (97/SR-2)

    Hi,

    The Combo box shows 20 rows (ie List Rows=20). There are about 100,000 ID numbers, and approximately the first 65000 records are shown. After that, there is a large amount of blank space.

    The SQL is:

    SELECT MyTable.ID FROM MyTable WHERE ((MyTable.ID)<>"") ORDER BY MyTable.ID;

    Thanks,
    Erica.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Remove blank space from combo box (97/SR-2)

    What do you hope to achieve by displaying 65000 rows? The performance is ghastly and you do see behaviors like you're describing because of all the efforst required in the interface to try to populate those rows. Nobody can actually *find* items in a list of 65000, so what is your purpose?
    Charlotte

  5. #5
    New Lounger
    Join Date
    Mar 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove blank space from combo box (97/SR-2)

    I don't directly use the form, but this is what I understand from the users:

    When you want to look up a record, you start typing the ID in the combo box. The number actually means something, it's not completely random. eg 30100009, where 3 denotes the year 2003, 01 denotes the month January and the rest of the numbers have a meaning too.

    The combo box also displays Names next to the ID, this also helps the users to display the correct record. So the user would only have to type the first few digits in the ID, and the combo box displays the nearest 20 records.

    The combo box is there so the user doesn't have to look through thousands of records. They only have to look at the nearest 20.

    Also, if the user types in one of the IDs that the combo box isn't displaying (even though it is in the query), the record still displays.

    I just want to remove the blank space & display all the IDs in the combo box.

    Thanks,
    Erica.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Remove blank space from combo box (97/SR-2)

    A combo box can only display 2^16 = 65536 rows, so you'll have to do it another way. For example, use three combo boxes:
    - the first lets the user select a year
    - the second lets the user select a month in that year
    - the third lets the user select a number within that month
    Search for cascading combo to get ideas on how to implement such a setup.

  7. #7
    New Lounger
    Join Date
    Mar 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove blank space from combo box (97/SR-2)

    Thanks for the info that combo boxes can only hold 2^16 values. It was really helpful. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    I figured out a way to fix the problem. I modified the row source property of the combo box, depending on the first 2 values that the user types in. So that way, there will always be less than 2^16 values (and no blank space!)

    Erica.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •