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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

import excel file. Data not always the same cells.

Status
Not open for further replies.

67peshawar294

Technical User
Mar 8, 2001
388
US
Hi all,
I just recieved a CF barcode scanner. I have two fields in my PXL:
UPCNumber, NumberHere. I copy the PXL to a XLS on my desktop and then import it to Access.

The only problem I have is, when I scan inventory I sometimes want to scan only certain products and compare with the inventory in Access.
Is there a way to specify the "Last cell to contain data"
when importing the xcel file to an access table?
Code:
Function GetInventory()

    DoCmd.TransferSpreadsheet acImport, 8, "InventoryScan", "C:\AccessFiles\Inventory.xls", True, "a1:[red]b88[/red]"

End Function
Where [red]b88[/red] can be [red]b5[/red] or any value to [red]b1000[/red].
Thanks
jim
 
Ha,ha! I found the problem. Someone,(Me?) had b155:b185 text format white!!! When I scanned the inventory I would stop at 150 and compare barcodes with inventory. It would pull blanks for the last 35 cells.
All is good...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top