Solved

Access 2007 Macro help

Posted on 2011-09-30
8
337 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
Comment Utility
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
Comment Utility
Can I view the code to determine this?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
<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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
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
Comment Utility
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
Comment Utility
Actually just needed to "compact and repair"  :-/
0
 
LVL 74

Expert Comment

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

;-)

Jeff
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

771 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

10 Experts available now in Live!

Get 1:1 Help Now