Share via

DoCmd.RunSavedImportExport

Anonymous
2018-03-09T16:34:23+00:00

I am trying to use a button for a simple saved export, but I keep getting this error message. 

      The specification with the specified index does not exist. Specify a different index. '0'.

Based on what I have read, this message pops up when the saved import/export has been deleted. I have not deleted it. I have even re-created it a couple times. Still keep getting the same error.

Thanks

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2018-03-09T17:46:27+00:00

You can convert macros to VBA code. This shows how:

https://support.office.com/en-us/article/introd...

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

7 additional answers

Sort by: Most helpful
  1. Anonymous
    2018-03-09T17:12:19+00:00

    I get the same error, but now instead of '0' at the end, it shows the export name.

    Private Sub Command70_Click()

        DoCmd.RunSavedImportExport "Export - qryFind_BOM_for_One_PartNum"

    End Sub

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2018-03-09T16:45:56+00:00

    Replace the brackets around the name with double quotations marks.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2018-03-09T16:41:51+00:00

    Sorry, should have thought of that to begin with.

    Private Sub Command70_Click()

        DoCmd.RunSavedImportExport (Export - qryFind_BOM_for_One_PartNum)

    End Sub

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2018-03-09T16:36:40+00:00

    Can you share your code that is producing the error?

    Was this answer helpful?

    0 comments No comments