Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2005
    Posts
    113

    Unanswered: Listbox problem (A2000)

    I have two identical listboxes. The first one shows the result of a sql query. When I doubleclick in the first listbox, I would like to add the object(s) to the other listbox, where it eventually will be (with some options) printed to a report. I use Acess 2000, and the method "addItem" doesn't seem to exist. Unfortunatly I cant change the original table to set a flag (i.e. chosen object). And if this wasn't enough, I need to give the user the possibility to also remove an object from the second listbox. Any ideas?

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    possible solution is a local table on the client (which you DO control) to hold the people selected.

    for the unselected list:
    "SELECT name FROM tableIdontControl WHERE name NOT IN (SELECT name FROM myLocalTable);"

    and for the selected list
    "SELECT name FROM myLocalTable;"

    and the double-clicks
    "INSERT INTO myLocalTable(Name) VALUES('" & unselectedList & "');"
    "DELETE name FROM myLocalTable WHERE name = '" & selectedList & "';"

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Nov 2005
    Posts
    113
    How do I do local table ? I have meny user in my accessprogram.

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    each user has his own local table.
    or
    you have a shared (and obviously no-longer-local) table somewhere on the net that everyone links to.

    products-with-promotions-this-month is a candidate for a shared table.
    people-in-my-sales-team is a candidate for my machine only.

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Jul 2005
    Posts
    144

    Smile take a look at this

    Hi Julita,
    take a look at this attachment, i think this might be what you are looking for.

    Hope it helps
    Attached Files Attached Files

  6. #6
    Join Date
    Nov 2005
    Posts
    113
    OH - thanks a lot for the exampel ranjah.

  7. #7
    Join Date
    Jul 2005
    Posts
    144

    Smile enjoy

    Quote Originally Posted by Julita
    OH - thanks a lot for the exampel ranjah.
    Your welcome!!
    I hope it helped?

  8. #8
    Join Date
    Nov 2004
    Posts
    64

    drop down/combo box on table

    ranjah

    how do you get the drop down/combo box on a table
    ie tblCandidateDocumation.CandidateID and tblCandidateDocumation.DocunationID

    regards

    peter
    Last edited by Peter.t; 11-29-06 at 02:24.

  9. #9
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    combo box in a table
    sounds like the evil lookup field.
    don't go there - the apparent convenience is not worth the confusion it will cause you later on.

    izy
    currently using SS 2008R2

  10. #10
    Join Date
    Jul 2005
    Posts
    144

    Smile

    Quote Originally Posted by izyrider
    combo box in a table
    sounds like the evil lookup field.
    don't go there - the apparent convenience is not worth the confusion it will cause you later on.

    izy
    peter,
    I completely agree with IZY here its setup to a lookup field which is not worth your time, you can run into problems later on.

    But if you still insist upon learning it i can help you just let me know.

    Ranjah

Posting Permissions

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