+ Reply to Thread
Results 1 to 2 of 2

Using a ListBox selection to query a database

  1. #1
    CLamar
    Guest

    Using a ListBox selection to query a database

    I am creating a User Interface in Excel that will query tables in Access. My
    first Access query places the data into a ListBox, from that list box the
    user will need to be able to query the database again for the selection he
    chose from the listbox. (Simply put I am trying to imput the ListBox
    selection into the SQL statement to query the database again) Does anyone
    have any suggestions on how to accomplish this.

    Thanks

  2. #2
    Gary L Brown
    Guest

    RE: Using a ListBox selection to query a database

    Build the query using the value from the listbox.
    ie:
    Dim strValue as string, strSQL as string
    strvalue = ListBox1.value

    strSQL = ..... & strvalue & ....
    HTH,
    --
    Gary Brown
    gary_brown@ge_NOSPAM.com
    If this post was helpful, please click the ''Yes'' button next to ''Was this
    Post Helpfull to you?''.


    "CLamar" wrote:

    > I am creating a User Interface in Excel that will query tables in Access. My
    > first Access query places the data into a ListBox, from that list box the
    > user will need to be able to query the database again for the selection he
    > chose from the listbox. (Simply put I am trying to imput the ListBox
    > selection into the SQL statement to query the database again) Does anyone
    > have any suggestions on how to accomplish this.
    >
    > Thanks


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1