• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 100
  • Last Modified:

Importing Excel into Access 2016

I'm using a macro in Access 2016 to import an excel file.  The user inputs the filename into a text box on a form and I need to pass that name to the field name the ImportExportSpreadsheet step in the macro.  It seems no matter how I format the name of the form/field it doesn't work.  I've tried [forms]![formname]![filename] but the macro says it can't find the file and generates a 2950 error.
  • 2
2 Solutions
Can you upload sample with this macro?
You can use designer:
designerPress button on the right size of field with file name, browse to you form and select field
You can also add it manually. Syntax like:
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Make sure the database is in a Trusted Location on the end user machine. You can add Trusted Locations in various ways:

ajdajdAuthor Commented:
I was missing the = sign in the expression.  Looking at your screen shot solved my issue.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now