Results 1 to 13 of 13

Thread: [RESOLVED] wildcard in where part of Select

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046

    Resolved [RESOLVED] wildcard in where part of Select

    I am building a Select Statement based on some listbox selections. When * is selected in the listbox I want it to be a wildcard. When I build it like this it doesn't work:

    "Select a from TableA where b = " & Listbox1.Text

    It doesn't work when * is the selection nor when '*' is the selection.

    Obviously I don't know how to set up the wildcard in the where part of the select statement.

    The english eqivalent of the query I want is "return all records from TableA where b is equal to anything.

    It would be tedious to just truncate the whole where part for a wildcard I think, because the real problem is more complex with several listboxes for some anded wheres. The problem presented here was watered down substantially for clarity and isolation of the specific issue on hand.

    How can I accomplish this?
    Last edited by Muddy; Mar 15th, 2007 at 10:28 AM. Reason: resolved

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