Results 1 to 8 of 8

Thread: listbox issue

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2010
    Posts
    67

    listbox issue

    Hi...
    i have ms access table with fields like s1,s2,s3.And i have 3 values in the listbox (form 1)like 45 56 23.I want these three value should be stored in s1,s2,s3 fields respectively.
    the code which i used for this is
    vb code Code:
    1. rs(0) = List1.list(0)
    2. rs(1) = List1.list(1)
    3. rs(2) = List1.list(2)
    but its not working.It didnt throws any error.simply this code is storing zero as a value in all fields(s1,s2,s3) of the access table.Can anyone pls help me on this..

  2. #2
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: listbox issue

    I would call this a "database issue" rather than a listbox issue, since the problem is storing data in the DB. The solution depends on what you use to connect/communicate with the DB.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2010
    Posts
    67

    Re: listbox issue

    k fine..is it possible to store all values in the listbox into the fields of table?

  4. #4
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: listbox issue

    Yes it is but like I said the solution depends on the method you use to connect with the DB.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Mar 2010
    Posts
    67

    Re: listbox issue

    I used the ADOdb connection.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Mar 2010
    Posts
    67

    Re: listbox issue

    Can you pls give me the code for that to do? using Adodb connection

  7. #7
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: listbox issue

    Searching the forums for "ADO insert record" will get you a lot of examples on how to do it. This is just one of them http://www.vbforums.com/showthread.p...ght=ado+insert

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Mar 2010
    Posts
    67

    Re: listbox issue

    Thank you for your help

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