CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    21

    Question Implementing AddItem method in MS Access 2000

    Hi,

    I'm developing an application in MS Access 2000 (using MS Access 2000 forms). I need to retrieve data from oracle server and populate listbox/combobox with records from the recordset. However I found that MSAccess 2000 does not support the 'AddItem' method (the method was introduced later). Can anyone suggest some work-around to implement AddItem method?

    I'm retrieving only one column of the table from the oracle database which needs to populate my list/combo. Also I'd like to mention here that the no. of records fetched is about 25000. So my concern is will MSAccess 2000 list/combo support such a big no. of rows?

    I'd appreciate if anyone could help with a piece of code as an illustration.

    Thanks in advance.

  2. #2
    Join Date
    Sep 2006
    Posts
    95

    Re: Implementing AddItem method in MS Access 2000

    among the properties of a combobox, on the 'data' tab, there is one called the 'Row Source' you can hook a combo up to a datatable with this. I recommend making a stored procedure that gets your data and use it here.
    You can also add multiple columns to your select to be displayed in the combo/list box. the size of the columns you can set in the 'format'section.
    'Column Count' tells Access the number of columns you want to display, and 'column widths' determines the sizes of the coumns in centimeters seperated with a ';'.
    On the Data Tab there is also a propertly called 'bound column' which tells access which of the columns from the SP is the one that contains the key value that must be stored in the control source ( which is the field in the table/query/whatever that you used to populate your form ).
    As for 25000 rows.. I don't think you want to populate a combobox with 25000 values, you're better off to make a list with search options on a seperate form for something that big.
    On Error Kill(User)

  3. #3
    Join Date
    May 2008
    Posts
    4

    Re: Implementing AddItem method in MS Access 2000

    I'm retrieving only one column of the table from the oracle database which needs to populate my list/combo. Also I'd like to mention here that the no. of records fetched is about 25000. So my concern is will MSAccess 2000 list/combo support such a big no. of rows?

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Implementing AddItem method in MS Access 2000

    Does it really matter? 200, or 20000. Nobody wants to look at 25000 lines of anything. How long would it take just to scroll to the last three pages?

    You should re-think that part. Data Source can be a query result.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured