Results 1 to 10 of 10
  1. #1
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Combobox not showing all records (Access2000)

    I've got a weird problem. In a new application for an existing client, I have a combo box that sometimes doesn't show all records! It is weird because sometimes it does show all records. When it happens it seems to affect all users, and when it works it works for everyone! This is not a huge recordset either, maybe 750 records should be returned from a table that holds maybe 15,000 records.

    I'm suspecting a timing problem within Access, perhaps caused by some problem with the network. I discussed it with the hardware guy, and we are going to replace their current hub with a switch, and to relocate the server closer to the switch. The server is a Linux box. Even if this isn't the cause of the current problem, we think these steps are prudent anyways.

    Anyone have any thoughts on any other situations that might be causing this problem?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  2. #2
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Royal Oak, Michigan, USA
    Posts
    255
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combobox not showing all records (Access2000)

    I've run into similar problems with combo boxes but ususally it returns all the records or no records at all. I've had some success changing the combo boxes row source from a SQL statement to a saved query or visa versa depending on how it was set-up originally. I've also had to change the row source from a table to a query that brings back all records Select "*". I never could get to the bottom of it but I've usually worked around it by varying the row source as illustrated.
    Hope that helps.

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Combobox not showing all records (Access2000)

    My rowsource is already a SQL statement, although not a saved query. But even so, what bothers me is the inconsistent behaviour; sometimes it works properly, sometimes it doesn't.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combobox not showing all records (Access2000)

    Could you post the SQL that the combobox is using?

    Also, do you know how many records should be displayed, ie, should it always return 750 records, or is it a bit more flexible then that?

  5. #5
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Royal Oak, Michigan, USA
    Posts
    255
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combobox not showing all records (Access2000)

    That's what bugged me as well and I could never figure it out. Try changing the SQL to a saved query. Who knows if it will work but it's worth a shot (if it does work, it still doesn't explain the inconsistent results)

  6. #6
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Combobox not showing all records (Access2000)

    I know it is not the SQL statement. The combo box is returning a list of clients in order by state. Those times when it is not acting properly, it doesn't return anything beyond "CA".

    I know that Access doesn't fill all of a combobox until it needs it. So with really big recordsets you often can move the scrollbar down, forcing Access to read more records. In this situation it is really a relatively small recordset, and you can move the scrollbar all the way down, and no more records are being read.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  7. #7
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combobox not showing all records (Access2000)

    That's not entirely true. A combobox has to get the initial 'count' when it loads, so when the list is dropped down, the data my not be 'all there', but the slider will be the appropriate size. You may want to look into using a callback function, if you suspect you are 'losing' the connection somehow.

  8. #8
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Combobox not showing all records (Access2000)

    That's not the consistent with what I've seen. If you have a really big recordset, you can move the slider all the way to the bottom, but when you release it it will "bounce up" to reflect its new position in the recordset, allowing you to slide it down even further. Depending on the size of the recordset, you can repeat this action many times.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

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

    Re: Combobox not showing all records (Access2000)

    If a combo box has a large number of items, the scrollbar thumb will have its minimum size, but you can infer that the exact number of items is not known yet, for if you drag the thumb all the way down, it will not take you to the last item, and it will jump back part of the way when you release it. Depending on the number of list items, you can repeat this one or more times. Only when you have reached the last record will the thumb act correctly.

  10. #10
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combobox not showing all records (Access2000)

    Hmm, you're right, I guess I deal with Callback functions too much, because with a callback function, it DOES size the slider based on the number of items. Try populating the combo with a callback function.

Posting Permissions

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