Results 1 to 5 of 5

Thread: Pass parameter

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    24

    Question

    I write this SQL quary :

    PARAMETERS Parametr Text ( 255 );

    SELECT tbl1.code, tbl1.Desc
    FROM tbl1
    WHERE tbl1.Desc Like "*" & [Parametr] & "*";

    it works very well in Access. but when I pass the parameter with VB I got an empty recordset , can you help me with it ?

  2. #2
    Hyperactive Member
    Join Date
    Feb 2000
    Posts
    284
    I'm not sure but you could try % instead of *

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    24
    Thanks but it did not work.


  4. #4
    Member
    Join Date
    Oct 2000
    Location
    chennai,india
    Posts
    44

    use like " & somevariable& "*'"

    this will work i think

    thanx and regards
    sundar

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    24
    Sorry about my last message , its working now
    here is the right way to do it (like Bigley told me to do , so thanks to him )

    PARAMETERS Parametr Text ( 255 );

    SELECT tblTreeDesc.TreeCodeDesc, tblTreeDesc.TreeDesc
    FROM tblTreeDesc
    WHERE (((tblTreeDesc.TreeDesc) Like ("%" & [Parametr] & "%")));

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