Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Posts
    292

    Unanswered: Multiply field in module (function) help...

    I have two functions in a module..

    I want my functions to mutiply with my field "ACC" (which is a number data type)

    Here are the functions..

    First:
    ====

    Function funCount3(prmSearchString2 As String) As Variant
    funCount3 = DCount("[INSP]", "[qryQualityStatus]", "left([INSP],2) = '" & prmSearchString2 & "' And ([Fixed] =True OR [REJ] = 'Y')")
    End Function

    I tried...

    Function funCount3(prmSearchString2 As String) As Variant
    funCount3 = DCount("[INSP]", "[qryQualityStatus]", "left([INSP],2) = '" & prmSearchString2 & "' And ([Fixed] =True OR [REJ] = 'Y')*[ACC]")
    End Function

    but that didnt work...

    Second
    =====

    Function funCount4(prmSearchString3 As String) As Variant
    funCount4 = DCount("[INSP]", "[qryQualityStatus]", "left([INSP],2) = '" & prmSearchString3 & "' And ([Fixed] =True OR [REJ] = 'Y') And Not IsNull([DATECLOSE])")
    End Function


    any ideas?

    thanks

  2. #2
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    Concerning:

    Function funCount3(prmSearchString2 As String) As Variant
    funCount3 = DCount("[INSP]", "[qryQualityStatus]", "left([INSP],2) = '" & prmSearchString2 & "' And ([Fixed] =True OR [REJ] = 'Y')*[ACC]")
    End Function

    why not just:

    Function funCount3(prmSearchString2 As String) As Variant
    funCount3 = DCount("[INSP]", "[qryQualityStatus]", "left([INSP],2) = '" & prmSearchString2 & "' And ([Fixed] =True OR [REJ] = 'Y')")*[ACC]
    End Function
    Ken

    Maverick Software Design

    (847) 864-3600 x2

  3. #3
    Join Date
    Jul 2003
    Posts
    292
    I get an error.. doing as you suggested..

    run-time error:
    62506

    Data Type mismatch in criteria expression

    any other ideas?

    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
  •