Solved

Access 2007

Posted on 2014-12-25
3
396 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

685 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