Function call in field control source property

M

mwick

Hello,

I have a report that runs in Access 2002 but not correctly
in 2000. The report as a text field with the property for
control source set to "=Replace([fieldname],"||",Chr(13) &
Chr(10))". In 2002 it replaces all || with carriage
returns and line feeds. In 2000 I get an Enter Parameter
Value form prompting for "Replace". Both systems have VB
6+ on them.

Any help would be greatly appreciated.

Thanks in advance,

Mike
 
M

Marshall Barton

I have a report that runs in Access 2002 but not correctly
in 2000. The report as a text field with the property for
control source set to "=Replace([fieldname],"||",Chr(13) &
Chr(10))". In 2002 it replaces all || with carriage
returns and line feeds. In 2000 I get an Enter Parameter
Value form prompting for "Replace". Both systems have VB
6+ on them.


That's odd, this is the second time in a half hour this
question has come up, almost as if you read my previous
reply and asked a follow on question before I posted the
other answer.

Whatever ;-)

I don't know if this issue has been fixed in a service
release for A2K, but it was definitely a problem in the
initial release. Replace and a few other functions were not
available outside of the VBA environment.

The workaround is to create a small user defined public
function in a standard module to run the Replace function.
Then use your function in the text box's ControlSource
expression.
 

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