Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2005
    Posts
    196

    Unanswered: Using variables as query criteria

    I have two variables, first word and second word. How do I use these variables as part of criteria in an existing query, with an asterix eaither side of them? Setting the query criteria to Like [firstWord] & [secondword] doesn't work! Cheers.
    Last edited by Fuerteventura; 11-24-05 at 12:28.

  2. #2
    Join Date
    Nov 2005
    Posts
    113
    Try this

    StLinkCriteria = " [Id1] =" & "'" & firstWord & "'" & " And " & "[ID2] =" & "'" & secondword & "'"

  3. #3
    Join Date
    Aug 2005
    Posts
    196
    many thanks for your help - however I've managed to do it by moving the value to a hifdden text box, which acts as the criteria in the query on my subform. Your code will be usefull in the future for me though so thanks again, cheers.

Posting Permissions

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