Results 1 to 9 of 9

Thread: [resolved] unbound listbox

Hybrid View

  1. #1
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: unbound listbox

    If there are going to be a large number of items needed on the list then you would be better placing these into a table and then set the rowsourcetype to Table/Query and then pull the information out of the table via an SQL entry in the RowSource.

    To determine the number of the line use the listindex property of the list box to return the line item number, or if that is not going to be of use then consider creating a sequence number inside the sql for the recordsource and set the number of columns to be 2 with the column width being the width of the control followed by ;0cm This effectively hides the second colum from view. On the double click of the list box you can pick up the text and position like the following..

    VB Code:
    1. TextVar = lstBox1.Column(0)
    2.   PosVar = lstBox1.Column(1)

    For an example of creating the sequence number please have a read through this thread..

    Simple Access
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    May 2005
    Posts
    530

    Re: unbound listbox

    I believe that will work just fine.
    Thanks.

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