troubleshooting Question

Appending to Access via VBA

Avatar of Shanan212
Shanan212Flag for Canada asked on
Microsoft Access
9 Comments3 Solutions405 ViewsLast Modified:
   DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, _
    "MSysTEMP", "C:\Users\ads\Desktop\" & iName

Hi Experts,

I have the above code to append an excel file to database.

Problem is, this is something I used in prior database and basic.

In the current database, my first field is called 'IDNUMBER'

When appending manually, I have to

- Change the type of this IDNUMBER field to 'text' (from double)
- Assign IDNUMBER as primary key.

Rest remains the same.

How do I incorporate the above 2 in the append query above?

Thanks for the help!
ASKER CERTIFIED SOLUTION
Shanan212

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros