ADP ok but problem with ADE - references(?)

  • Thread starter Thread starter Sag73
  • Start date Start date
S

Sag73

Hi Group,

Using A2003, SQL Svr 2000.

Have developed an ADP which has a few SPs, Functions, Views & Reports. The
ADP works fine and I have included some code in it to authenticate users
before making the connection to the SQL Server and drop the connection to
the database when the ADP is closed. All this works fine.

The only form (apart from a Splash Screen) that is used in this application
has a combo-box, 2 check-boxes, four date-time pickers and 2 buttons
(OK/Cancel).

Problem is when I have tested everything to work fine, I have password
secured the project code (just in case) and "Make ADE". The resultant ADE is
created but would encounter an error even on my machine. The Splash Screen
loads up and show the other form. When I do selection of dates checkboxes
and click on OK, I get a message saying "You entered an expression that has
an invalid reference to the property onclick" .

I have been thinking that it might have to do with references but then it is
not working on my own PC where the ADP works fine - am I wrong?

I have scoured the internet and havent found anything relating to ADE in
particular and how to go about finding and fixing the problem. I am rather
new at all this and have been rather confused with all the material I have
found about early/late binding.

Any help would be greatly appreciated.
 
Never heard of that.

Just a wild guess: it could be the password that protects your VBA code?
Since you want to make an ADE file, which strips all code, there is not need
to protect code, since there is not code. So, try to remove the password
before making ADE, see what happens (make sure you have original ADP file
saved somewhere).
 
Another thing you can try is decompiling the project. I've seen oddities in
Access 2000 & XP where they'll miscompile things, or something will get
corrupted in the compiled code, and it'll produce an error like that.

To decompile, run Access via the Start/Run and type in:

<full path to Access.exe> "yourfile.adp" /decompile

This works in Access versions up to XP, I have no idea if they've continued
to allow it in 2003, but I would certainly hope so, cuz it's damned useful
in a variety of situations (gets rid of compilation bloat quite nicely,
amongst other things).

Anyway, I'm rambling. Let us know what, if anything, solves your problem in
the end.


Rob
 
Thanks to you both Norman & Robert.
I'll have to try that when I get back to the office on Monday since I only
have A97 @ home.
I will definitely try to reproduce the password thing (as Norman has
suggested) in A97 MDE and see what happens.

Thanks a lot and will post back on Monday at latest.
 
S> Problem is when I have tested everything to work fine, I have password
S> secured the project code (just in case) and "Make ADE". The resultant
S> ADE is created but would encounter an error even on my machine. The
S> Splash Screen loads up and show the other form. When I do selection of
S> dates checkboxes and click on OK, I get a message saying "You entered an
S> expression that has an invalid reference to the property onclick" .

Yes, most likely it's references. http://www.trigeminal.com/usenet/usenet026.asp?1033
has relevant information. Especially note the requirement to explicitly
reference every object.

I was fighting this problem by playing with a clone project, from which I
was removing every form, report, reference, control, etc., narrowing down to
the very minimum around the problematic place; ideally, isolating the single
factor causing the error message, when with that factor removed the problem
did not occur.


Vadim
 
Hi Vadim,

Thanks for the link but I have indeed come up on this article while googling
for this problem. This article seems to be a reference (pun not intended!)
in the matter. However, I am very new to this and most of the article is
indeed above my limited knowledge!!

I have noted indeed the requirement to explicitly reference every object -
does that mean that I shouldcode in every piece of code that I have in the
ADP and explicitly add VBA.* Acess.* or Application.* in front of each
object to resolve this?? Well, if this is the only choice I have I guess
i'll have to do it but I was hoping that I had wrongly understood the
article on trigeminal and that there should be a "better" way to solve this
in our era of hitech tools!!

Well it's a shame if this doesn't have any other resolution.

Thanks a lot Vadim, I'll try both what Norman has suggested in the earlier
thread and what you are suggesting about explicitly referencing objects to
see which works. This will inevitably lead me to other problems I can see
coming. If this is a reference problem which occurs on my machine which has
the proper DLLs and references set while developing what will happen when I
give that away to users who do not have some of the DLLs or earlier versions
of same??!

I can see me posting to this thread for a long time!! :)
 
S> - does that mean that I shouldcode in every piece of code that I have in
S> the ADP and explicitly add VBA.* Acess.* or Application.* in front of
S> each object to resolve this??

let's put it this way: if you follow my advise and narrow down the problem,
and it indeed appears to be the reference to some wrong object, then you
will be able to fix it by specifying the reference in full. So, presuming
that that is indeed the reason and the cure, you can achieve it by two ways:
(1) identifying the problematic reference and specifying it in full, or (2)
specifying in full all references.

Here's an example. Let's say, your project references a library MyDLL that
has its own method DSUM. And in some field on your form, you use Access
native function DSum in an expression. That's where Access will get confused
and is likely to display a message like yours. You wouldn't use MyDLL.DSum
and wouldn't even know it's there; but Access would get confused.


Vadim
 
Hi guys,

I hit myself all over when I discovered the reason for this error!!

In fact, the click event was firing code to bring up a report based on the
slection of the user.I was (in code) setting the input parameters of the
report in design view!!!! Obviously, that would work in ADP and fail in ADE
as design mode is not available.

Sorry for having wasted your time on that!

And, Vadim I have been able to roll out the application to users without any
problems fortunately as I did not use any reference library than the usual
three.
 
sounds to me like a missing reference or something

you mean you run the ADE on a different machine and it doesn't work; it
craps out?

i'd downlevel a couple of ado classes.. go down to 2.6 ot something (if
you're on 2.8)

that happens to me quite frequently
 
Hi Aaron,

Thanks for responding but I guess you might have missed a thread: See below:

----- Original Message -----
From: "Sag73" <[email protected]>
Newsgroups: microsoft.public.access.adp.sqlserver
Sent: Monday, September 26, 2005 8:00 PM
Subject: Re: ADP ok but problem with ADE - references(?)
 
Back
Top