Solved

Access 2007 Macro help

Posted on 2011-09-30
8
348 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
  • 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
A short article about a problem I had getting the GPS LocationListener working.
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

867 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now