in

Archived Data Techniques Forums

Scanning in Access 2000

Last post 03-26-2009 9:50 AM by ChristyO. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-26-2009 8:53 AM

    Scanning in Access 2000

    I can scan a 1 page document or a photo without a problem. I am trying to scan a multipage document and am running into a Memory cannot be "read" error thrown by MSACESS.  I have a 2 page document.  The second page goes through the scanner and then the error pops up and Access is then shut down.  Has anyone run across anything like this?

    Here is my code:

    'Prepare scanner    '========================================    'Check to make sure Scanner is Online    retVal = ImScan.GetCapability(ImTwain80Ctl.Capabilities.Device_Online, var, lDataType)       If retVal = False Then       
    MsgBox "Scanner must be turned on.", vbCritical, "Scan A Document"       
    Exit Sub   
    End If    retVal = ImScan.NegotiateCapability(Capabilities.Auto_Feed, True)    'Clear buffers    retVal = ImScan.SetCapability(Capabilities.Clear_Buffers, True, Bool)        If Me.[optMultiPage] = False Then       
    Me.ImScan.MaxPages = 1   
    Else        
    Me.ImScan.MaxPages = CInt(Me.txtPages)   
    End If     ImageMan.AppendImage = True     hDIB = ImScan.ScanPage(Me.[chkShowScannerSetup])    Me.ImScan.TransferMode = Memory    While (hDIB <> 0)       
    ImageMan.hDIB = hDIB       
    ImageMan.SaveAs (strFileName)       
    i = i + 1 ' number of pages       
     ' scan successive pages       
    hDIB = ImScan.ScanPage(False)   
    Wend        ImScan.CloseSource 

     

    Filed under: ,
  • 03-26-2009 9:50 AM In reply to

    Re: Scanning in Access 2000

    I removed the TransferMode and all is fine now.

Page 1 of 1 (2 items)
Copyright 2009 Data Techniques, Inc. All Rights Reserved.