Solved

Access 2007 Macro help

Posted on 2011-09-30
8
374 Views
Last Modified: 2012-05-12
Inheirited a MS Access 2007 thingy.

There is a macro that is in the db that isn't functioning.  There are only 2 steps to this macro.  Single stepping through leads to the second step being the issue.
The error is:

cannot open database ''.  It may not be a database that your application recognizes, or the file may be corupt.

This second step is attempting to import a text file into an existing table (fyi... the first step deletes all existing records, successfully, from the same table).

Any idea on what the issue may be or how I can view the "saved" import for errors?

This was working at one time and now it isn't and I have been called in to help.
0
Comment
Question by:classnet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
8 Comments
 
LVL 28

Accepted Solution

by:
burrcm earned 500 total points
ID: 36891300
Hard to say without a look. Clean out data, compact, zip and post a copy of the db here along with a sample of the text file to import. Sounds like a missing import specification, but should be easy enough to sort out with a sample.

Chris B
0
 

Author Comment

by:classnet
ID: 36891472
Can I view the code to determine this?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36891785
<Can I view the code to determine this?>
There is no "Code to see this"

Simply post a sample of the DB as burrcm requested
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36891790
Sample database notes:
1. Back up your database(s).
2. Combine the front and back ends into one database file.
3. Remove any startup options, unless they are relevant to the issue.
4. Remove any records unless they are relevant to the issue.
5. Delete any objects that do not relate directly to the issue.
6. Remove any references to any "linked" files (files outside of the database, Images, OLE Files, ...etc)
7. Remove any references to any third party Active-x Controls (unless they are relevant to the issue)
8. Remove, obfuscate, encrypt, or otherwise disguise, any sensitive data.
9. Compile the code. (From the VBA code window, click: Debug-->Compile)
10. Run the compact/Repair utility.
11. Remove any Passwords and/or security.
12. If a form is involved in the issue, set the Modal and Popup properties to: No
    (Again, unless these properties are associated with the issue)
13. Post the explicit steps to replicate the issue.
14. Test the database before posting.

In other words, ...post a database that we can easily open and immediately see and/or troubleshoot the issue.
And if applicable, also include a clear graphical representation of the *Exact* results you are expecting, based on the sample data.
0
 
LVL 28

Expert Comment

by:burrcm
ID: 36894683
I doubt that you intended to accept my comment as a solution, as nothing has been resolved yet. Please post the requested samples so we may assist. I will request that this be reopened.

Mods - Please "unaccept" and reopen, as this is not resolved.

thanks

Chris B
0
 

Author Comment

by:classnet
ID: 36912900
Actually just needed to "compact and repair"  :-/
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36914729
Then please accept  burrcm's first post as the solution...

;-)

Jeff
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question