Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Posts
    395

    Unanswered: Re: syntax for boolean variable in where clause

    Hi everyone,

    I have a query to return a recordset if the boolean variable is true. What is the syntax in VBA?
    The variable is partial in tblTmp_inspec.

    I tried the followings but non of them works
    Where tblTmp_inspec.partial = 1"
    Where tblTmp_inspec.partial = -1"
    Where tblTmp_inspec.partial = <> 0"


    This is my query
    str = "Select tblTmp_inspec.bag_num, tblInspection_types.type_desc as inspection_type From tblTmp_inspec "
    str = str & "Inner join tblInspection_types On tblTmp_inspec.inspection_type = tblInspection_types.inspection_type_id "
    -->str = str & "Where tblTmp_inspec.partial = #True#" Me.RecordSource = str

    Thanks for your assistance.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    SELECT ... FROM ... WHERE (SomeFlag=True);

    SELECT ... FROM ... WHERE (SomeOtherFlag=False);
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

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