Transferspreadsheet Issue with Data Types

  • Thread starter Thread starter Sash
  • Start date Start date
S

Sash

I'm trying to transfer a spreadsheet through VBA code and it's dropping some
data. The column is PatientNum. This column may contain 123456,
A324940....in other words, all numbers or letters and numbers; therefore, I
made the table field a text field. However, it's still dropping some data.
Any ideas?
 
Have you tried changing the filed type to text in Excel first and then
transfering? Are you using something like:
Docmd.transferspreadsheet,, "your spreadsheet name","Your spreadsheet
location",true, range if needed?
 
Milton,
This is exactly how I'm doing the transfer. I can try to change the column
to text. I was hoping to have little to no interaction required by the user.
Now, they basically complete a spreadsheet, open my application and push a
button to generated a formatted file to be imported into a collection system.
Looks like I'll need to find another way tomorrow.
Thanks,
Robin
 
Milton,
This is exactly how I'm doing the transfer.  I can try to change the column
to text.  I was hoping to have little to no interaction required by theuser.
 Now, they basically complete a spreadsheet, open my application and push a
button to generated a formatted file to be imported into a collection system.
 Looks like I'll need to find another way tomorrow.
Thanks,
Robin

If the columns remain constant, why not just create an import
specification and then just use it... Then Access doesn't ever guess
what kind of field something is, because you already gave that
information in the spec...
 
I didn't think you could create specs for spreadsheets. Whenever I manually
import a spreadsheet, it never gives me the "Advanced" button where you
create specs. I'd love to know how to do this for spreadsheets. Can you
give me the steps or some guideance here?
 
Back
Top