From 2003 to 2007 - Buttons do not works ?

S

SpookiePower

I have made a database in access 2003 and now try it in
2007 for the first time. Non of my buttons works.
Do i have to convert my database to 2007 ? I have just
tryed to open it up in 2007.
 
L

LindaSD

Tom - I have posted this same problem/issue in different thread. Setting the
folder and even setting the actual db in the trusted location did not make
the vb/buttons work for me. The only thing that worked was redesigning the
form and using macros rather than vb. A question though...we have over 60
dbs in our 1,000+ employee company and we are switching to Office 2007. It
sounds like the trust center is a local pc setting. Since this is so
different from 2003, will my IT department have to set the location of every
server level as trusted on every pc as they install 2007? Since there are so
many databases scattered over so many server folder locations, it is of
concern that nothing will work correctly. I have done exactly as you
describe in your linked web site and the forms with vb still won't run
correctly. Any further suggestions on these issues? Thanks, Linda
 
T

Tom Wickerath

Hi Linda,
Setting the folder and even setting the actual db in the trusted location
did not make the vb/buttons work for me. The only thing that worked was
redesigning the form and using macros rather than vb.

If your database was in a trusted folder, then the VBA code *should* have
run okay. I suppose there is a possibility that your system administrator
took an overly conservative approach by setting a Group Policy that disallows
users from changing any Trust Center settings in Access for any folders. To
verify if the folder is actually trusted or not, you might try the Access
2007 version of my TempWorkDB sample (CreateTempWorkDB.accdb, 438,272 bytes).
It includes a macro, borrowed from a sample database found in John Viescas
and Jeff Conrad's Access 2007 book. The macro will cause a message to be
displayed if the application has been started from a non-trusted folder:

http://www.accessmvp.com/TWickerath/downloads/tmpwrkdb.zip

Did you receive any error messages when you clicked a button? There is a
possibility that you had a MISSING reference, but I believe one generally
gets an error dialog presented that states something to the effect of missing
reference(s). Here are two excellent articles on this subject:

Solving Problems with Library References (Allen Browne)
http://allenbrowne.com/ser-38.html

Access Reference Problems (Doug Steele)
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
T

Tom Wickerath

PS. I forgot to answer your question--I answered your statement at the
beginning of your reply--in my first reply to you...
A question though...we have over 60 dbs in our 1,000+ employee company
and we are switching to Office 2007. It sounds like the trust center is a local
pc setting.

Yes, however, I'm fairly certain that a system administrator can set the
Trust Center settings via a Group Policy, perhaps even every time you log in.
Since this is so
different from 2003, will my IT department have to set the location of every
server level as trusted on every pc as they install 2007?

This is a question that your IT department should ask directly to their
Microsoft representative. A 1,000+ employee company very likely has a
dedicated Microsoft person assigned as an account representative. That's
their job to help answer these types of "how-to" questions for their large
customers.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
L

LindaSD

Thanks Tom. When I get back to work next week, I'll try the links. It was
the IT system administrator that checked the way I set the trusted location
but still worth checking since our parent company does do some extreme
security setting to systems.

The vb code came from converting a macro to vb in the 2003 db which still
works fine. When I look at the original macro while in 2007, there is an
error at "setValue". When I review the old macro and then the converted vb
in 2007 it looks like some of the code is missing. When I get to work, I'll
open the vb in 2003 and see what that looks like. There are no error
messages except when in 2007 I open the vb and hit run, a window opens asking
for a macro - stating it can't find the macro and I have no clue why since
there is no macro in the vb. I'm not good at vb and I only do vb code if I
can find an example so am lost when there are problems like this.

It is very frustrating that something that worked and was so easy is now not
working because 2007. The code is simple -while in one form on a record,
clicking the button runs onclick opens a different form with a drop down,
make or type in a selected record and afterupdate closes the form and takes
the selection and filters the original form (with the button) to that record.
This code is in many databases and works in 2003. I was just barely
managing to keep Access working for us in 2003. I'm feeling lost now.

I'm also wondering what a mess changing/setting trusted locations on every
pc in the company will be for every database we use.

I will also look at your links for sample code that will help. I'll let you
know next week if I find a solution. Your help is appreciated.
 
T

Tom Wickerath

Hi Linda,
When I look at the original macro while in 2007, there is an
error at "setValue".

I found the following on pages 916-917, and in Table 18-1 "Macro Actions
That Are Not Trusted", in my copy of the book "Microsoft Office Access 2007
Inside Out", written by John L. Viescas and Jeff Conrad
(http://www.amazon.com/dp/0735623252):

Bottom of page 916:
"Access 2007 recognizes 32 macro actions as potentially unsafe to run in a
database that is not trusted. Seven of the actions are not trusted only when
you select certain arguments. Table 18-1 lists the macro actions that Access
will run only when the database is trusted. The Comments column lists special
cases dependent on the arguments you choose or an alternative trusted method
you can use."

Page 917
Includes SetValue in the listing of Macro Actions That Are Not Trusted, with
the following comment: "Use the trusted SetProperty action instead of
SetValue to change the Enabled, Visible, Locked, Left, Top, Width, Height,
Fore Color, Back Color, or Caption properties of forms, reports or controls."

Also, on page 918, I see this: "Macro actions that are not trusted display
an exclamation mark in the left column of the macro design window."
It is very frustrating that something that worked and was so easy is now not
working because 2007.

I sympathize....I'm not using Access 2007 at this time.
The code is simple -while in one form on a record,
clicking the button runs onclick opens a different form with a drop down,
make or type in a selected record and afterupdate closes the form and takes
the selection and filters the original form (with the button) to that record.

I'm not sure I understand, but it sounds to me like you are applying a
filter on a form bound to a larger recordset than what you ultimately wish to
work with. You might consider an alternate approach, which involves an
unbound search form that allows a user to find the record they wish to work
on. In this way, you have much less network traffic for a multiuser Access
application, where the data is on a shared file server. I have some examples
posted:

Simplist example, with one multi-select list box:
http://www.accessmvp.com/TWickerath/downloads/elements.zip

A bit more advanced samples:
http://www.accessmvp.com/TWickerath/downloads/Chap08QBF.zip

An example that includes a Word document with a sample database:
http://www.seattleaccess.org/downloads.htm
See the download "Query By Form"
Tom Wickerath, February 12, 2008

These examples all involve VBA code, which may seem a bit daunting to you at
first, but will definately pay dividends if you take the time to try to learn
it. Some resources for learning VBA code include:

http://www.seattleaccess.org/downloads.htm
See the download "DAO - Back To Basics Compilation/Demo"
"Tom Wickerath, Jan/Feb 2007"

and Access Basics by Crystal:
http://www.accessmvp.com/Strive4Peace/Index.htm


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 

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