Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Looking for Dlookup Syntax, Again? (a2k (9.0.6926) SP-3 Jet 4.0 SP-7)

    I have the following code in a Form After Update event:

    Getting the following error:

    The expression you entered as an query parameter produced this error:

  2. #2
    Star Lounger
    Join Date
    Sep 2002
    Location
    New York, New York
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Looking for Dlookup Syntax, Again? (a2k (9.0.6926) SP-3 Jet 4.0 SP-7)

    Hi John,

    The problem appears to be that you included the lngStartNumber variable within the quotes of the string. Since you want to include the variable and not the string 'lngStartNumber', it needs to be outside the quotes, like this (and like you do in the msgbox line):

    <pre>If DLookup("[Check Number]", "[Check Writer]", "[Check Number] = " & lngStartNumber) Then </pre>



    Hope this helps,
    -Karl

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Looking for Dlookup Syntax, Again? (a2k (9.0.6926) SP-3 Jet 4.0 SP-7)

    Thanks

Posting Permissions

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