Trying to use my database on a different pc

N

NH Hiker

I have an Access 2007 database that works fine on my Vista pc. When I copy
the database to an XP machine with Access 2007, the database opens fine. All
the access forms, table, etc work, macros work, but it appears that the VB
code doesn't execute. I don't get any error messages!!

eg. This code works fine on my machine, but doesn't execute on the other
machine. Again no error messages!

Private Sub txtHomePhone_GotFocus()

'sets the cursor to the beginning of the local exchange - after the area code
If Len(txtHomePhone) Then
Me.txtHomePhone.SelStart = Len(Me.txtHomePhone)
Else: Me.txtHomePhone.SelStart = 1
End If

End Sub

This is probably a newbie issue. Can anyone point me in the right direction?
 
D

Daniel Pineault

Have you ensured that the macro security is set to medium and that you
enabled them to run at the startup?
 
N

NH Hiker

Thanks, I'll check that out on the other PC. I was able to replicate the
situation on PC that works, by changing the security level to "Disable all
macros with notification". So it's a real good possibility.

What i don't understand is why i don't get some sort of warning. Is there a
way to enable my code without choosing "Enable all macros"?

Also, and this may be related, how do I enable my code to run at startup?
 
P

Pete D.

This is done by the option Never Show Information about Blocked Content
within the trust center under Message Bar. I have had this happen on
systems that have run different versions of access datafiles on one machine.
When setting is on no warnings are generated and it is by design.
 

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

Top