Results 1 to 2 of 2

Thread: Query this

  1. #1
    Join Date
    Jan 2005
    Posts
    3

    Unanswered: Query this

    I have created a Parameter Query That requires 3 Tables The parameter Gets its criteria from some boxes on a search form to do this I have Entered the SQL as follows.....

    WHERE (((Products.catagorie) Like "*[Forms]![FrmRepOrdersByCatagory]![CbxOrdersByCatSearch]*") AND ((Orders.orderDate) Between [Forms]![FrmRepOrdersByCatagory]![TxtBegginningDate] And [Forms]![FrmRepOrdersByCatagory]![TxtEndDate]))

    However it does not work can anyone tell me whats wrong with this code or if theres anything wrong with this code or if im just being thick.

    Thankyou

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    strings-that-are-dates need to be concatenated using #
    WHERE myDate = #" & formDateAsText & "# ...etc

    strings-that-are-text need to be concatenated using '
    WHERE myString = '" & formString & "' ...etc

    izy
    currently using SS 2008R2

Posting Permissions

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