Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003

    Question Unanswered: Passing text box value to query

    Hi all!

    I have a query that searches my "Company" table (specifically the "CompanyName" field). I have been opening the query in Edit mode and entering in the values I am searching for in the Criteria field. However, I need to be able to do a search that include wildcards. This is no problem when doing it from the query's Edit mode, but I want the user to be able to enter the "CompanyName" they are looking for (INCLUDING wildcards) in a text box (txtCompanyConflict) on a form called "frmConflict." I want this value to be passed to the query as the criteria to be searched.

    Right now, I have the criteria in the query as [Forms]![frmConflict]![txtCompanyConflict] and it will not work with wildcards. I can put an exact name in there and it runs fine. However, I can't seem to get it to work with an wildcard (Specialty pulls up fine, Special* pulls up nothing).

    Any help would be greatly appreciated!!

    I am a student and I am doing a side project for the company I work for part time and would like to get this to work!

    Thank you for your help!

  2. #2
    Join Date
    Dec 2003

    Talking I answered my own question

    Sorry for wasting your space here, but I fixed my problem :-D My criteria looks like this now:

    Like "*" & [Forms]![frmConflict]![txtCompanyConflict] & "*"

Posting Permissions

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