Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom application icon reverts when running import

Status
Not open for further replies.

PRMiller2

Technical User
Jul 30, 2010
123
Have a weird one here. I have an Access 2003 .MDE file in which my Application icon has been set to an .ico file. I've also selected the option to "Use as Form and Report icon." The icon works fine and displays for most events, etc.

However, when I'm executing code that begins with "DoCmd.TransferSpreadsheet acImport", the icon disappears, reverting to the standard Access 2003 form and application icon.

Any suggestions?
 
Has no one else encountered this issue? It continues to plague me and I'm not sure what else to check.
 
Here's a section of the module in question:

Code:
    'Import the selected files to the temporary table
    If Not IsNull(varFiles) Then
        If IsArray(varFiles) Then
            For intCounter = 0 To intFileCount
                intProgress = intProgress + 1
                Call ProgressMeter(intProgress, intProgressBarMax)
                DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "ztblQARawImport", varFiles(intCounter), True
                strSQL = "INSERT INTO tblQAImportFile" & _
                     " (lonQACOMPANYAuditRecordID_fk, txtFileName)" & _
                     " VALUES(" & glngRecordNumber & ", '" & varFiles(intCounter) & "');"
                dbCurrent.Execute strSQL
                lngImportFile = CurrentDb.OpenRecordset("SELECT @@IDENTITY")(0)
                strSQL = "UPDATE ztblQARawImport" & _
                         " SET lonQAImportFileID_fk = " & lngImportFile & _
                         " WHERE lonQAImportFileID_fk=0;"
                dbCurrent.Execute strSQL
            Next intCounter
        Else
            intProgress = intProgress + 1
            Call ProgressMeter(intProgress, intProgressBarMax)
            DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "ztblQARawImport", varFiles, True
            strSQL = "INSERT INTO tblQAImportFile" & _
                     " (lonQACOMPANYAuditRecordID_fk, txtFileName)" & _
                     " VALUES(" & glngRecordNumber & ", '" & varFiles & "');"
            dbCurrent.Execute strSQL
            lngImportFile = CurrentDb.OpenRecordset("SELECT @@IDENTITY")(0)
            strSQL = "UPDATE ztblQARawImport" & _
                     " SET lonQAImportFileID_fk = " & lngImportFile & _
                     " WHERE lonQAImportFileID_fk=0;"
            dbCurrent.Execute strSQL
        End If
    End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top