MDE Toolbars don't work when distributed

S

Silvester

* I have secured the A2000 mdb fe and be using the same custom workgroup
file. I do NOT distribute this file with the mdb.
* I ensured that latest mdac 2.8 and ado dlls are included and referenced by
the mdb.
* The mdb and consequent mde work perfectly on the development machine.
* I do not reference any other mde
* I follow Peter Walker's system of referencing as found at
http://www.papwalker.com.au/dllhell/index.html . This method works perfectly
when I distribute the mdb and there are no broken references.
* I use custom toolbars and hide all Access toolbars on app startup
* Mdb works perfectly when distributed

PROBLEM :
After converting working mdb to MDE
* All the buttons on the custom toolbar and switchboard stopped working in
the distributed mde but autoexec macro runs perfectly.
* clicking on the custom toolbar and switchboard generates error "Function
Name cannot be found"

Can someone pleae help me to figure out what the problem could be ? If there
are broken refs, how would I find out about it in an mde ?
 
P

Paul Overway

Remove the equal sign from in front of the function in the OnAction property
of your toolbar button.
 
S

Silvester

Thanks for the suggestion but that did not work. I still get the error
"function name cannot be found"
 
M

Mark Phillipson

To check your reference in code try:

Dim ref As Reference

For Each ref In Application.References
If IsError(ref.NAME) Then
MsgBox "Missing Reference:" & vbCrLf & ref.FullPath
Exit Sub
Else
MsgBox "Reference: " & ref.NAME & vbCrLf _
& "Location: " & ref.FullPath & vbCrLf
End If
Next

HTH

--

Cheers
Mark

Free Access/Office Add-Ins at:
http://mphillipson.users.btopenworld.com/
 
S

Silvester

Thank you for that code snippet. Running this from my autoexec macro on
startup informs me that all my refs are intact for my distributed mde.

So my problem is NOT a broken ref one.

I still need help on how to solve this strange problem.
 
A

Albert D. Kallal

Silvester said:
Thank you for that code snippet. Running this from my autoexec macro on
startup informs me that all my refs are intact for my distributed mde.

So my problem is NOT a broken ref one.

Well, it may not be a broken ref, but certainly may be one of a miss matched
ref.

You CLEARLY state the mde functions just fine on your dev pc, but not on the
target pc. Obviously, some library, or something is missing on the target
pc. You have probably installed a zillion things over the years on your dev
pc, and it is probably a very bad pc to use to create your final
distribution on.

I would try installing ms-access, and testing the mdb on that target pc.
That way, you can do some testing on that target pc, and find out what is
missing, or miss-matched. Try using some of those functions from the command
window, or even do a re-compile (save and compile all) of some code that you
edit/change on this test pc.

It is also possible that your setup you made using the package and
deployment does not also include those libraries. In addition, if you don't
have the correct license for some activeX libraries/controls on your
development pc, then you can't distribute them.

So, often many activeX library's will NOT function on the target pc. So, you
might again check what libraries you are including on the dev pc.

However, the first thing I do when a mde does not work on a target pc is put
a copy of the mdb on that pc, and then you can debug/compile code. If the
target pc only has the runtime system, then I would consider installing
ms-access on that target pc for testing.
 
T

TC

Hi Paul

Is there a known issue of some kind with the presence or absence of the
equal sign in MDEs versus MDBs?

TIA,
TC
 
S

Silvester

Thank you Albert for pointing me in the right direction. I have been able to
solve this problem and I'm posting my results here for general interest.

* This particular problem was not caused by broken refs
* On closer scrutiny of the version numbers of the dlls/ocxs that I was
distributing with my app and comparing it with those present on the target
machine I found two errors :
File1 : mscomctl.ocx
Development machine : ver 6.00.8862
Target machine : ver 6.008177
Action : rectified by overwriting file in system folder on target
machine with the latest version supplied with distributed app

File2 : scrrun.dll
Development machine : ver 5.0.0.3715
Target machine : ver 5.6.0.6626
Action : replaced old version being supplied with the app with the
latest version

Another item of interest is that Paul's suggestion of removing the equal
sign from in front of the function in the OnAction property of the custom
toolbar button causes the button NOT to work in the mde. The equal sign must
remain (at least in my mde)

Kahuna, the dll solution found in
http://www.papwalker.com.au/dllhell/index.html is far more elegant.

Thank you all for your input and help.
 
P

Paul Overway

Yes....there is KB article on it somewhere....I forget how I found it. In
any case, I was getting the same message noted in this post and removing the
= sign took care of it. As I recall, it didn't occur in all versions, but
the toolbar buttons worked in all versions with the fix.
 
P

Paul Overway

Interesting....I was getting the same message, but removing the = sign
worked for me. I found some KB article suggesting it as a solution.
 

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