Results 1 to 9 of 9
  1. #1
    mikael is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    24

    import all data from listbox to a textbox

    hye.. i need to display all data from my listbox (List0) in my multiple textbox. what i noticed is just to display selected record to the text box by using code
    Code:
     =list0.column(0)
    but in my case, i really need to display the record from the other row in lstbox.


    so, can anyone pls help me on the code to display all record from listbox to textbox?
    thanks..

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    What is the data source for the listbox?
    Can you show us some of the data involved and what you would like to see?

  3. #3
    mikael is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    24
    sorry for my messy database.. start from Serial Number Form, type a number between 1 or 2 ( since i just create the data with this 2 number)and press enter. and the next form named FormSearch will appear.in the form, the databse will query the related record and display on the listbox named List0. in button command23, the click event will provide select all. my problem start with the button which cannot highlight all rcord in the List0. and can i get any suggestion to output the selected record to the textbox below? i will create more textbox since there are to many record to be display. thanks.
    Attached Files Attached Files

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    ?? Not following exactly, but if you just hit enter on the Search form (don't type a value) all records are selected.

    On your List box properties change the MultiSelect from None to Simple.


    If you have to move data from the list box to a text box, why not just put it in the textbox to start?

    You would select records from the table, concatenate them with a CrLf in a string to populate the text box -- BUT I see no reason for doing this.

    Perhaps you should tell us the "business rationale" for this and see if there are some alternatives.
    Attached Thumbnails Attached Thumbnails AfterHittingCommand23.jpg  

  5. #5
    mikael is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    24
    thanks for the help..
    actually, i need to create some application to find record based on serial number.
    so now, i will have many record with the same serial number..
    what i need to do is to display all the related record in a form..
    i learnt how to search record by using those method (as given code).
    i really dont know alternative way to solve this..
    the problem now is to display selected record into the easier way for reading.
    can u pls help me again? thank you so much..

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Read the first 3 articles at this site.
    http://www.rogersaccesslibrary.com/forum/topic238.html

    Define exactly what a serialNumber is. Does it uniquely identify something?

    Get yourself a workable data model (tables and relationships) from the Entity Relationship approach before getting into the coding.

    Make sure you have some test data (good and bad data) to "test your model" as you design.

    Then for search ideas watch this free video tutorial
    http://www.datapigtechnologies.com/flashfiles/searchform.html



  7. #7
    mikael is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    24
    thanks for the link..
    anyway, my boss need to have a form as like as website search form..
    so what i need here is to provide textbox in the first form, and get the query in the second form. and i need to get the result display in the form, not datasheet view.
    i really appreciate your concern. can i get any suggestion to display many query record in a form?

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Before you build a form, you have to get your database designed.
    Please review my previous post and links.

  9. #9
    mikael is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    24
    ok i try to rebuild my database. thanks again.. you help me much

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 12
    Last Post: 06-08-2012, 02:37 AM
  2. Replies: 1
    Last Post: 12-08-2011, 08:03 AM
  3. Unable to populate textbox based on listbox
    By marcustofeles in forum Forms
    Replies: 21
    Last Post: 10-24-2011, 07:18 AM
  4. Replies: 2
    Last Post: 09-07-2011, 11:33 AM
  5. Replies: 5
    Last Post: 10-19-2010, 09:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums