Access 2k code doesn't run under Vista/A2k7

T

teddysnips

I have a new client who has an Access 2000 database that used to run
under Windows 2000 Pro. They have just "upgraded" to Access 2007
under Vista, and the old database stopped working - buttons on forms
did nothing.

When I first looked at it the problem seemed to be the change to the
signature of Docmd.Requery (fewer arguments) so I made the necessary
changes and the database compiled. I compiled and tested it on my
work system (also Vista, A2k7) and it worked fine.

When I copied the db onto the client's machine, it didn't work. I
checked that it compiled correctly (it did) but when I hit the
buttons, nothing happened. I put a breakpoint in the code and it
never hit. An example of the code (by the way, I didn't write the
code, and I don't know who did - I was just called in to help):

Private Sub Command171_Click()
On Error GoTo Err_Command171_Click

Dim strReportName As String
Dim strFilter As String

Me.Refresh
strReportName = "rptEstimate"
strFilter = "EstimateID = Forms!frmestimate!EstimateID"
DoCmd.OpenReport strReportName, acViewPreview, , strFilter


Exit_Command171_Click:
Exit Sub

Err_Command171_Click:
MsgBox Err.Description
Resume Exit_Command171_Click

End Sub

A breakpoint on any of the lines is just not hit. In other words, it
looks like the code isn't running. I've tried creating a brand new
2007 database and importing all the objects - exactly the same
result. The code compiles, but doesn't run.

Any thoughts?

Thanks

Edward
 
F

Fred Boer

Dear Edward:

Have you put the application in a "trusted location"? Access 2007 won't run
code if it isn't. To set these options go Office Button>Access Options>Trust
Centre>Trust Centre Settings>Trusted Location...

Hope this helps!
 
E

edwardwill

Dear Edward:

Have you put the application in a "trusted location"? Access 2007 won't run
code if it isn't. To set these options go Office Button>Access Options>Trust
Centre>Trust Centre Settings>Trusted Location...

Hope this helps!

Thanks, I had tried that, but it didn't work. Any other ideas?

Edward
 
F

Fred Boer

Not offhand. Perhaps someone else will jump in at this point - I was hoping
it was as simple as the trusted location...

Good luck!
 
G

Gina Whipp

Two thoughts, try Run-As-Administrator for the short-cut and make sure when
you copied it and pasted on your Client's machine you didn't do so as 'Read
Only'.
 
A

ARC

I like how you put upgraded in quotes... :)

I wonder if they're not responding to the security message that's disabling
all macors, etc.? Do you know if they added the folder as a trusted
location?
 
F

Fred

Or just have them upgrade their Vista to XP. It looks like Vista is headed
towards joining Millenium on the scrap heap anyway.

Fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top