Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2013
    Posts
    81

    Question Unanswered: Syntax query - boolean

    Hi All

    I'm working on building a DLookup where one of my criteria is a boolean (yes no), but I'm not sure of the correct syntax. I've obviously got it wrong though since its failing on that point.

    The syntax I've got for the third criteria point is

    Code:
     & " AND [VolumeMeasuringCylinder] =  & Forms!frmSet!subfrmVolume!VolumeMeasuringCylinder ")
    I've tried specifiying the criteria value as true or false and the code works, so it must be something in the line above I've got wrong.

    VolumeMeasuringCylinder is stored (using the same name) in both tables as yes/no.

    I've been searching for the correct syntax but other than finding a reference to treating it as a number I'm getting no where.

    Any assistance would be greatly appreciated.

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Try:
    Code:
    & " AND [VolumeMeasuringCylinder] =  " & Forms!frmSet!subfrmVolume!VolumeMeasuringCylinder)
    Have a nice day!

  3. #3
    Join Date
    Jun 2013
    Posts
    81
    Ahaaa brilliant thanks Sinndho, that seems to have solved the issue. Very much appreciated.

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Posting Permissions

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