Solved

Access 2007

Posted on 2014-12-25
3
379 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
Comment Utility
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
Comment Utility
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
Comment Utility
your suggestion worked.  Thank u.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

763 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

8 Experts available now in Live!

Get 1:1 Help Now