Results 1 to 2 of 2
  1. #1
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544

    Question ByRef error...never seen it before

    I have an error message...

    "Compile error:

    ByRef argument type mismatch"

    When the error pops up the variable "vMisc" is selected...

    I didn't receive the error message yesterday...haven't changed anything in the code.

    Code:
    Private Sub cmdUpdateData_Click()
        Dim vAuto, vFWD, vMisc, vOnTimeExec As Double
        Dim i As Integer
        i = 1
        vAuto = DLookup("PctAuto", "qryEmailPercents_Month", "[RecordID] = " & i & "")
        vFWD = DLookup("PctFwd", "qryEmailPercents_Month", "[RecordID] = " & i & "")
        vMisc = DLookup("PctMisc", "qryEmailPercents_Month", "[RecordID] = " & i & "")
        vOnTimeExec = DLookup("PctCompleted", "qryOnTimeExecution", "[RecordID] = " & i & "")
        
        Call funEmailData(vAuto, vFWD, vMisc)
    End Sub
    
    Function funEmailData(vPctAuto, vPctFwd, vPctMisc As Double)
        Dim mySQL, vMetricName, vFiscMonth As String
        Dim db As DAO.Database
        Dim rs As DAO.Recordset
    '.........code
    End Function


  2. #2
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Well...solved issue again....I did not realize this but you must define data set individually...See below solution

    Code:
    Dim vAuto As Double, vFWD As Double, vMisc As Double, vOnTimeExec As Double

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Error 438 error in Access 97
    By Bones in forum Access
    Replies: 3
    Last Post: 01-05-2011, 10:12 PM
  2. Replies: 2
    Last Post: 12-02-2010, 02:35 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums