Solved

Access 2007

Posted on 2014-12-25
3
386 Views
Last Modified: 2014-12-27
My Lenovo Think Centre is a Win 7 Prof 64 bit pc, and I have office 2007.  A Microsoft technician had to do a reinstall of the office 2007, and then there were teething problems like the Windows installer always came up wanting to reinstall Outlook 2007, and this was fixed by Microsoft.
But now the small Access 2007 database that I had created before all this, does not  work.  All the buttons do not execute the code.  

Private Sub Copypassword_Click()
' This procedure runs when the Copy button is clicked.
'On Error GoTo Err_cmdCopy_Click

    ' Set focus on the results.
    Me.password_used.SetFocus
   
    ' Copy the results to the clipboard.
    DoCmd.RunCommand acCmdCopy

'Exit_cmdCopy_Click:
   ' On Error Resume Next
   ' Exit Sub
   
'Err_cmdCopy_Click:
  ' MsgBox Err.Number & " " & Err.Description, vbCritical, "cmdCopy_Click"
    'Resume Exit_cmdCopy_Click
End Sub

In the VB code under references, I see the following being checked :
Microsoft Access 12.0 Object library
OLE Automation
Microsoft DAO 3.6 Object library
Microsoft VB for Applications Extensibility 5.3

thank u for your suggestions.
0
Comment
Question by:jegajothy
3 Comments
 
LVL 7

Expert Comment

by:Robert Sherman
ID: 40518142
Are you getting an error message, or is just nothing happening when you click the button?
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40518332
Be sure the database location has been added as a Trusted Location. You can do this in the Trust Center settings in 2007, under Access Options.

You might also have a corrupt database. Can you create a NEW database, and add working code to a button? If so, you might need to perform maintenance on your database. Create a backup first, then do this:

1. Compact your database.
2. Compile your VBA Code. From the VBA Editor, click Debug - Compile. Continue doing this until the Compile menu item is disabled.
3. Compact again.

You might also need to Decompile. To do that, create a shortcut with this as the Target:

"full path to msaccess.exe" "full path to your database" /decompile

Run that shortcut, and then perform the 3 steps above again.

You may also need to move everything into a new, blank database container. To do that, create a new database and use the Import feature to move all your objects from the old database into the new one. Note that when doing this Access may identify one or more items as "corrupt". If so, you'll have to skip those items, and recreate them, either from a known good backup, or from scratch.

Finally, make sure your Office and Windows installations are fully up to date. Also make sure your antivirus is fully updated, and that you have run a recent scan of your system.
0
 

Author Closing Comment

by:jegajothy
ID: 40519564
your suggestion worked.  Thank u.
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

Suggested Solutions

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

911 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

22 Experts available now in Live!

Get 1:1 Help Now