• Dlookup question (97)

    Author
    Topic
    #357507

    The following dlookup complains that my criteria is incorrect & doesn

    Viewing 0 reply threads
    Author
    Replies
    • #531218

      Hi,
      Try changing your expression to:
      Me.Text106 = DLookup(“blendpercentage”, “blendpercentages”, “month=” & Choose(month(Date), “Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”, “Dec”) & ““)
      As you’re returning a string from your choose function, you need to enclose it in quotes in the criteria string.
      Hope that helps.

      • #531222

        thanks it worked! now i’m working on the 2nd half of my thread.

        • #531228

          Sorry – I overlooked that bit.
          Try:
          Me.Text106 = DLookup(“blendpercentage”, “blendpercentages”, “month='” & Choose(month(Date), “Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”, “Dec”) & “‘ And type = ‘OA'”)*Me!Text101
          Hope that helps.

    Viewing 0 reply threads
    Reply To: Dlookup question (97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: