Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2002
    Posts
    2

    Thumbs down Unanswered: Listbox rowsource update on access 200x

    I have a form with a listbox, which has no rowsource and no rowsourcetype on form open. I have also in the same form a textfield and a button. When I click on button, I get textfield.value and use it in a SQL SELECT as listbox.rowsource. I also assign table/query to rowsourcetype.

    NOW: PROBLEM: On Access 2002, as I click on the button, the listbox gets the new values fron the query. On Access 2000 this doesn't work, as the listbox is updated but still whith no values. I also tried whith a listbox.requery, whith no results.

    What can I do? THANKS


  2. #2
    Join Date
    Apr 2002
    Posts
    2

    SOLVED

    OK JUST SOLVED.
    I assigned the value "Tabella/Query" instead of "Table/Query" because my version of access 2002 is in Italian, while the other is English.

    THANKS TO ALL. SEE YOU NEXT TIME

  3. #3
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    I've seen this in a number of different threads, and I am not sure why people do this.

    What I am refering to is the assignment of a RowSourceType in code.

    Why?

    In other words, set your RowSourceType in the properties window, as "Table/Query" and leave it. Just because you are assigning the RowSource SQL string dynamically doesn't mean you have to assign the RowSourceType dynamically.

    In fact, doesn't Access automatically default the RowSourceType to "Table/Query" in every single version of Access?

    Lilo, I don't mean to point this out too harshly, but I think it is a great educational opportunity for all of us Access users. I am, personally, a strict minimalist, when it comes to programming. In other words, if you don't have to screw with something, don't. And what makes Access great is that it provides you with the tools, and default settings, which are, for 90% of applications, right on.

    Glad you were able to resolve this on your own.

    Good luck.

Posting Permissions

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