Importing Data Error Checking

J

Justin

I have two vendors for the same product. I'm importing data for their
supplied files. The two are different formats and field layouts (cvs & xls).
I'm able to import the data with out a problem using TransferText and
TransferSpreadsheet.

I would like to provide some error checking incase an operator selects the
wrong data type. Currently the system just stops.

If MsgBox("Is this Data?", vbQuestion + vbYesNo, "Data Selection") = vbYes
Then
DoCmd.TransferText acImportDelim, , "vwOne", _
fnVar, True
Else
DoCmd.TransferSpreadsheet _
TransferType:=acImport, _
TableName:="vwTwo", _
FileName:=fnVar, _
HasFieldNames:=True
End If

Any suggestions would be appreciated.
 
J

Justin

Also, blanks rows are sometimes imported with the data. I'm importing into a
key field so this causes the error message. Is there a way to suppress the
import or the message?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top