Code no longer works

S

Sue Compelling

Hi

I'm using Access2007 and have the procedure below on after update - which
works perfectly fine in my environment - though when the user installs it the
code no longer works.

I have decompiled the DB and also "unsandboxed" it ... (per a previous posts
answer) though this hasn't fixed it.

There are also 3 other after update events (around making boxes invisible
etc) that are not working either.

Any clues on where I might start looking?


Private Sub cboSearch_AfterUpdate()
With Me.RecordsetClone
.FindFirst "ContactID = " & CBOSearch
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
Me.txtNewText.SetFocus

End Sub
 
D

Dale Fye

Sue,

Can I assume that other code is working?

With Access 2007, depending on the users security settings, they may not
have their Access setup to allow macros (read VBA code). If they have not
enabled macros, then the code will not work.

You can circumvent this by distributing an MDE, in which case, they will get
a warning:

"A potential security concern has been identified"

If they then select "Open", it will allow the VBA code to function.
 
S

Sue Compelling

Apologies for my ignorance Dale - what's an MDE and how does one "distribute"
it??
 
D

Dale Fye

Sue,

Sorry, I forgot you were using Access 2007; in 2007 it is called an
".accde" file.

This is a compiled version of the application which prevents your users from
viewing or modifying your code. In order to create an mde file, you must
open the original file, then select the "Database Tools tab on the ribbon
bar. At the far right, you will see an item "Make ACCDE", click on that
item and then indicate where you want to save it and what you want to name
the file in the Save As dialog box. Access will save your .accdb file as a
..accde file. Keep in mind that no one can do anything with the code in an
"accde" file, so you must maintain a copy of your accdb file if you want to
be able to make future edits to the application.

I would recommend the following as well:
1. Make a backup of you application
2. Decompile and the compile the application before you make the .accde
file
3. Set your startup form and other options

HTH
Dale
 
S

Sue Compelling

Thanks Dale - as it turned out the user wasn't accepting the code - though
I've now delegated the folder as a trusted site ....
 

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