R
RobGMiller
-Access 2003:
-Running an MDE on many different client computers
Errors Encountered:
"There is an invalid use of the .(dot) or ! operator or invalid parenthesis"
"Error 3075: Function is not available in expressions in query expression"
I've seen many posts on this issue but nothing has worked for me yet in all
circumstances. Both error messages relate to library problems. Essentially,
you need to remove and reselect refrences from an application database VB
editor to allow the application to connect with the current DLLs, OCXs and
TLBs on the client computer. There are alos many suggestions about trying to
ensure that all referenced library files are the same version.
My experience with this technique has been dismal to say the least. The idea
of running an MDB copy of an MDE application on every client computer to
reselect libraries simply makes the application not worth building using
Access.
In any case, it doesn't always work. I have replaced every library file with
the equivalent of what is on a computer where the application works. By the
way, in some cases this is impossible to do and in some cases they just get
overwritten with the original somehow. But even if it can be done in some
cases the referencing of the new files still doesn't help because the
functions that are in use are not located in the libraries that are
referenced apparently.
I've had instances where I can run the exact same code in a test database as
an MDB or MDB but cannot run the original application with exacly the same
reference setup after resetting the references on the same computer.
I've managed to resolve some of the issues by three general methods.
1 - Do not use builtin functions such as Instr, Left, Right, Ucase and
Format out of access Queries
2 - Do not reference controls to use a value in automatic calculations on
unbound controls.
3 - Do not use builtin functions like Date() and Now() in the default value
of controls.
In all three cases, errors occur some times but not all the time so it seems
to be better to stay away form these techniques to get the job done all the
time.
In the case of number 2 there is no easy way around it. Errors seem to occur
more frequently where tabs are involved. You simply have to use other more
complex ways of getting the result of a calculation in real time.
For instance: If you have a control on one tab showing the result of two
controls on a differnet tab in the same form.
controlx.ControlSource:
=CustomFunction-DevideByTwo([Forms]![MainForm]![SubForm]![OtherSubFormContrainer].[Form]![Tab].[Pages]("PageName").[Controls]("SubFormContainer").[Form]![ControlName])
This will result in "There is an invalid use of the .(dot) or ! operator or
invalid parenthesis". Not all the time but lots of the time.
The way around this issue is to send the DvideByTwo function, information
that allows you to lookup the value of the referenced control, perform the
calculation and return the result.
I am looking for more information on these issues generally to see if we can
categorize or define categorically the types of techniques to stay away from
or devevelop a general approach that will work well in all possible
instances.
Also, I'd like to pinpoint exactly which libraries are responsible for these
types of errors. I get the feeling that they are not Office library files but
probably Windows.
Are there libraries that are used by Access and come with Access but do not
need to be referenced specifically. In that case, if you are developing on a
machine that has Access 2007 installed, using these later versions of
libraries, the application migth not run on a machine which only has Access
2003 installed even thought the libraries are not referenced specifially.
-Running an MDE on many different client computers
Errors Encountered:
"There is an invalid use of the .(dot) or ! operator or invalid parenthesis"
"Error 3075: Function is not available in expressions in query expression"
I've seen many posts on this issue but nothing has worked for me yet in all
circumstances. Both error messages relate to library problems. Essentially,
you need to remove and reselect refrences from an application database VB
editor to allow the application to connect with the current DLLs, OCXs and
TLBs on the client computer. There are alos many suggestions about trying to
ensure that all referenced library files are the same version.
My experience with this technique has been dismal to say the least. The idea
of running an MDB copy of an MDE application on every client computer to
reselect libraries simply makes the application not worth building using
Access.
In any case, it doesn't always work. I have replaced every library file with
the equivalent of what is on a computer where the application works. By the
way, in some cases this is impossible to do and in some cases they just get
overwritten with the original somehow. But even if it can be done in some
cases the referencing of the new files still doesn't help because the
functions that are in use are not located in the libraries that are
referenced apparently.
I've had instances where I can run the exact same code in a test database as
an MDB or MDB but cannot run the original application with exacly the same
reference setup after resetting the references on the same computer.
I've managed to resolve some of the issues by three general methods.
1 - Do not use builtin functions such as Instr, Left, Right, Ucase and
Format out of access Queries
2 - Do not reference controls to use a value in automatic calculations on
unbound controls.
3 - Do not use builtin functions like Date() and Now() in the default value
of controls.
In all three cases, errors occur some times but not all the time so it seems
to be better to stay away form these techniques to get the job done all the
time.
In the case of number 2 there is no easy way around it. Errors seem to occur
more frequently where tabs are involved. You simply have to use other more
complex ways of getting the result of a calculation in real time.
For instance: If you have a control on one tab showing the result of two
controls on a differnet tab in the same form.
controlx.ControlSource:
=CustomFunction-DevideByTwo([Forms]![MainForm]![SubForm]![OtherSubFormContrainer].[Form]![Tab].[Pages]("PageName").[Controls]("SubFormContainer").[Form]![ControlName])
This will result in "There is an invalid use of the .(dot) or ! operator or
invalid parenthesis". Not all the time but lots of the time.
The way around this issue is to send the DvideByTwo function, information
that allows you to lookup the value of the referenced control, perform the
calculation and return the result.
I am looking for more information on these issues generally to see if we can
categorize or define categorically the types of techniques to stay away from
or devevelop a general approach that will work well in all possible
instances.
Also, I'd like to pinpoint exactly which libraries are responsible for these
types of errors. I get the feeling that they are not Office library files but
probably Windows.
Are there libraries that are used by Access and come with Access but do not
need to be referenced specifically. In that case, if you are developing on a
machine that has Access 2007 installed, using these later versions of
libraries, the application migth not run on a machine which only has Access
2003 installed even thought the libraries are not referenced specifially.