Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    3

    Unanswered: Dlookup problems

    Can anyone help with this

    DLookUp("[Input]","Data","[Drawing Description] = Like '*" & [Forms]![Myform]![Input] & "*'")

    I'm getting a syntax error and I can't find the problem.

    Thanks

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    A couple possibilities:

    1. Input is a reserved word; although access will let you get away with using it as a field name, it can cause problems in code and elsewhere.

    2. The function is looking for a string, or something it can convert to a string. If the control contains a null value, it will cause an error.
    Last edited by tcace; 04-18-04 at 21:49.

  3. #3
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    Two possibilities for coping with null values:

    Put the control in parenthesis and add an empty string. This converts the null value into an empty string, which is a valid string value.

    For example, change: [MyControl] to ([MyControl] & "")

Posting Permissions

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