Results 1 to 4 of 4
  1. #1
    Lori F is offline Novice
    Windows 11 Access 2019
    Join Date
    Jan 2024
    Posts
    12

    Running a Saved Import is trying to use the wrong file name to import from

    I download a file from Paypal that is usually called Download [61].csv. Although the 61 increments every month. I open that file, then save it as PaypalTest.xlsx in the same file directory every month. I then created an Import in Access that I want to run each month. The first month, it ran fine when I created it. I told it to save the Import specifications. Now that I'm running it the 2nd month from the Saved import, I get an error that Download [61] is not a valid name. This month it was Download [62], but either way, the saved specs show that it is using PaypalTest.xlsx from the appropriate directory. So I don't understand why it would be trying to use the originally downloaded file name from last month instead of the file name that I saved it as. I had to delete the saved import, then create a new import to get it to import the data as expected (again, using PaypalTest.xlsx) as the saved file name. So then I did another test with a new saved file and having the same problem all over again. For some reason, the saved import procedure is not using the correct file name even though it shows correctly when I look at my saved imports. If I was trying to use the name shown in the error, I would understand what the problem is, but the saved import makes no reference to the file name it is trying to use.

    Click image for larger version. 

Name:	Screenshot20240305.png 
Views:	10 
Size:	6.3 KB 
ID:	51567






  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Shot in the dark, but could it be that "Download [61]" is also the tab name, and something in your code looks for that?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Lori F is offline Novice
    Windows 11 Access 2019
    Join Date
    Jan 2024
    Posts
    12
    After doing a few tests, you are absolutely correct. It appears that when I save the csv file to the xlsx, it named the tab with the original file name instead of 'Sheet1' or the name of the file that I saved it as. I had no idea that the saved import saved the tab name since that isn't even a parameter that is asked for. Thanks so much for your help! Now I know how to resolve the issue. After I save the file, I'll name the tab Sheet1, then save again. I recreated the Import, saved it, then tested by changing the tab name and it no longer worked. Then I changed the tab name back to Sheet1 and it worked again. Easy fix, but it sure had me stumped. Have a blessed day!

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help! It might help to see your code, but you may be able to refer to the sheet by position instead of name.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. import excel import some wrong date format
    By ano in forum Import/Export Data
    Replies: 4
    Last Post: 12-30-2023, 07:28 AM
  2. setting file path for saved import / export
    By krag in forum Programming
    Replies: 10
    Last Post: 01-29-2018, 08:13 PM
  3. Replies: 5
    Last Post: 08-09-2017, 04:46 AM
  4. Replies: 2
    Last Post: 02-28-2017, 01:34 AM
  5. Replies: 7
    Last Post: 11-30-2013, 08:45 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums