Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002

    Unhappy Unanswered: data type mismatch in criteria expression

    I get the following error: Data type mismatch .... i don't understand why... i have changed all my data types to text

    this is were the error occurs:

    Dim strfilter As String
    strfilter = "afdelingsid = " & Me!Arb_afdeling
    Me!txtafdeling = DLookup("afdnaam", "tbl_afdelingen", strfilter)

    Any suggestions

    please help me out i am trying to solve this for days...

    Many thanks

    kind regards

    Bart Coenen or

  2. #2
    Join Date
    Jul 2002
    common mistake this one mate

    if the field afdelingsid is text you MUSt enclose the filter text with single quotes (')

    like this:

    strfilter = "afdelingsid = '" & Me!Arb_afdeling & "'"

    You will make tyhis mistake alot I promise you - we all do


Posting Permissions

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