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

    Unanswered: Listbox marked or not?

    I have two listboxes and i want to move posts between them, but i can't maintaine focus at the actual post. The post in the listbox is marked but it really is not until I click on it. If i don't click at the post because it uppeares marked then I move an empty post. I need to force it to be marked or unmark it. Please!

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    does this old "twin lists" demo come close?

    izy
    Attached Files Attached Files
    currently using SS 2008R2

  3. #3
    Join Date
    Nov 2005
    Posts
    113
    Darn it didn't solve my problem because i have 2 tables. I move post between them. I can't ad a field "selected" because i read from a textfile and can't change the post.

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ho hum!

    ?? a tblTmp ?

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Nov 2005
    Posts
    113
    Yes I got a temparary table - i need to see wich posts has been selected. Then i print a report of them

  6. #6
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    i need to see wich posts has been selected. Then i print a report of them

    ??multiselect list??

    izy
    currently using SS 2008R2

  7. #7
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    I have some code for moving stuff from one list to another without use of tables (I was too lazy to create tables, populate, destroy etc. ).
    I will dig up, clean out and post (boss cracking the whip at the mo )
    Testimonial:
    pootle flump
    ur codings are working excelent.

  8. #8
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    whilst pootle is distracted by whips, another thought:

    dblclick on the theList generated from your txt file runs something like

    strSQL = "INSERT INTO tmpTable (myID) VALUES (" & theList & ");"
    currentdb.execute strSQL

    strSQL = "SELECT * FROM tblTxt WHERE tblTxt.myID NOT IN SELECT tmpTable.myID FROM tmpTable;"
    theList.rowsource = strSQL

    probably a
    strSQL = "DELETE * FROM tmpTable"
    currentdb.execute
    when you start

    and myID as PK of your txt and .boundcolumn of theList

    izy
    currently using SS 2008R2

  9. #9
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hmm.... turns out it wasn't quite the rustic little hillbilly form I thought it was.

    Julita - if you manage to work your way through this I suspect you will know more VB than you did before you started

    It took a bit of sorting out for posting. I haven't really annotated. I'm afraid I have a bad habit of not annotating and I really couldn't face going through all the code and describing the functions. I will happily do so if requested - just not tonight

    In summary -
    The form demonstrates moving values from one unbound list box to another as well as manipulating the order. This is then returned to the calling form both as a string list and as a string array (I find one is more useful than the other depending on what you are trying to do).

    HTH

    EDIT - I removed the attachment - it was a bit sizey (600KB zipped!). Please see the attachment on post 11.
    Last edited by pootle flump; 01-28-06 at 08:34.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  10. #10
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    BTW - the atractive button rollover effect comes from one of our members (CyberLynx as I recall - apols if I got that wrong).
    Testimonial:
    pootle flump
    ur codings are working excelent.

  11. #11
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hmm... Decompiled the mdb - no longer 3MB in size
    Attached Files Attached Files
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

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