Access Report thinks built-in functions are Parameters

  • Thread starter Thread starter Dougal Fair
  • Start date Start date
D

Dougal Fair

I have developed an application on my computer
that uses Access2000 to do reports. All works
fine.

But when I tried to deliver the application
(including the Access2000 MDB files) to the
client's brand-new laptop (with Office installed,
including Access2000 SR-1), the reports can't seem
to understand the built-in functions I use in the
formulas for the report fields.

Specifically, I use this control source for a
field:

="(" & Left([HomePhone],3) & ")" &
Mid([HomePhone], 4,3) & "-" & Mid(HomePhone], 7,8)


(well, without the line breaks...)

When I try to view the report, it shows a dialog
box labelled "Enter Parameter Value" and is asking
for the parameter "Mid". If I enter a value and
hit "ok", it just shows an empty report.

If I edit the control source and just use
[HomePhone], it works fine. It's the built-in
function Mid that it thinks is a parameter for
some reason.

Also, as I said, it works fine on MY computer,
running Acess2000 SR-1 also.


Any ideas?


TIA
 
Any time you have an application that works fine on one machine, but not on
another, the first thing to suspect is a References problem.

This can be caused by differences in either the location or file version of
certain files between the machine where the application was developed, and
where it's being run (or the file missing completely from the target
machine). Such differences are common when new software is installed.

On the machine(s) where it's not working, open any code module (or open the
Debug Window, using Ctrl-G, provided you haven't selected the "keep debug
window on top" option). Select Tools | References from the menu bar. Examine
all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)
 
Any time you have an application that works fine on one machine, but not on
another, the first thing to suspect is a References problem.

This can be caused by differences in either the location or file version of
certain files between the machine where the application was developed, and
where it's being run (or the file missing completely from the target
machine). Such differences are common when new software is installed.

On the machine(s) where it's not working, open any code module (or open the
Debug Window, using Ctrl-G, provided you haven't selected the "keep debug
window on top" option). Select Tools | References from the menu bar. Examine
all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)


Thanks MUCH - that was exactly the problem, It
was referencing MS DataGrid 6.0, although I don't
know why. I suppose I might have tried it out
once a long time ago on the development maching,
but I don't actually use it.

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



Dougal Fair said:
I have developed an application on my computer
that uses Access2000 to do reports. All works
fine.

But when I tried to deliver the application
(including the Access2000 MDB files) to the
client's brand-new laptop (with Office installed,
including Access2000 SR-1), the reports can't seem
to understand the built-in functions I use in the
formulas for the report fields.

Specifically, I use this control source for a
field:

="(" & Left([HomePhone],3) & ")" &
Mid([HomePhone], 4,3) & "-" & Mid(HomePhone], 7,8)


(well, without the line breaks...)

When I try to view the report, it shows a dialog
box labelled "Enter Parameter Value" and is asking
for the parameter "Mid". If I enter a value and
hit "ok", it just shows an empty report.

If I edit the control source and just use
[HomePhone], it works fine. It's the built-in
function Mid that it thinks is a parameter for
some reason.

Also, as I said, it works fine on MY computer,
running Acess2000 SR-1 also.


Any ideas?


TIA
 
Back
Top