Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access 2007

Posted on 2014-12-25
3
Medium Priority
?
408 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 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

886 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