By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,912 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

Run a function from "On Click" or "On Exit"

P: n/a
Good day, and thank you in advance for any assistance. I'm having trouble
with something that I'm trying for the first time.

Using Access 2000 - I want to run a function either on the click of a button
or on leaving a text box. For the immediate task, either will work as well
as the other. I think.

I'm just at the beginning of this, and the form has two text boxes - Text0
and Text1. The user input to Text0 is a dollar amount, in numbers. On either
leaving the text box or clicking a button, I want to run a function to
convert the numerical value to the dollar amount in words, and then put that
string into Text1. I copied a function for this purpose - it came from the
mvps.org Web site. The function is named "English".

I'm not sure if the function is being called. I get the following error
message, whether I use a command button's "On Click" event, or the text box
"On Exit" event -

The expression "On Exit" you entered as the event property setting
produced
the following error: Ambiguous name detected: English

Then it says -

*The expression may not result in the name of a macro, the name of a
user-defined
function or [Event Procedure].
*There may have been an error evaluating the function, event or macro.

I can't tell what is ambiguous. The function does use a variable named
"English" - is that possibly the conflict? I've never used a function,
except in a Saturday morning class a few years ago, so my troubleshooting
skills aren't of much use here. Please be gentle, and thank you.
Steve E.

May 2 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Presumably you are talking about this English() function:
http://www.mvps.org/access/modules/mdl0001.htm

The "ambiguous name" message means you have a couple of things in your
database that have the same name. Did you save this function in a module
named "English"? If so, try renaming the module to something else.

If it is not the module, there must be something else that has this name.

If nothing is visible, try compacting the database:
Tools | Database Utilities | Compact

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Serious_Practitioner" <Se************************@att.net> wrote in message
news:fh*******************@bgtnsc05-news.ops.worldnet.att.net...
Good day, and thank you in advance for any assistance. I'm having trouble
with something that I'm trying for the first time.

Using Access 2000 - I want to run a function either on the click of a
button
or on leaving a text box. For the immediate task, either will work as well
as the other. I think.

I'm just at the beginning of this, and the form has two text boxes - Text0
and Text1. The user input to Text0 is a dollar amount, in numbers. On
either
leaving the text box or clicking a button, I want to run a function to
convert the numerical value to the dollar amount in words, and then put
that
string into Text1. I copied a function for this purpose - it came from the
mvps.org Web site. The function is named "English".

I'm not sure if the function is being called. I get the following error
message, whether I use a command button's "On Click" event, or the text
box
"On Exit" event -

The expression "On Exit" you entered as the event property setting
produced
the following error: Ambiguous name detected: English

Then it says -

*The expression may not result in the name of a macro, the name of a
user-defined
function or [Event Procedure].
*There may have been an error evaluating the function, event or macro.

I can't tell what is ambiguous. The function does use a variable named
"English" - is that possibly the conflict? I've never used a function,
except in a Saturday morning class a few years ago, so my troubleshooting
skills aren't of much use here. Please be gentle, and thank you.
Steve E.

May 2 '06 #2

P: n/a
I'll start looking. And yes, the code I'm using is the one at that URL.
Thank you.

Steve E.

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:44***********************@per-qv1-newsreader-01.iinet.net.au...
Presumably you are talking about this English() function:
http://www.mvps.org/access/modules/mdl0001.htm

The "ambiguous name" message means you have a couple of things in your
database that have the same name. Did you save this function in a module
named "English"? If so, try renaming the module to something else.

If it is not the module, there must be something else that has this name.

If nothing is visible, try compacting the database:
Tools | Database Utilities | Compact

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Serious_Practitioner" <Se************************@att.net> wrote in
message
news:fh*******************@bgtnsc05-news.ops.worldnet.att.net...
Good day, and thank you in advance for any assistance. I'm having trouble
with something that I'm trying for the first time.

Using Access 2000 - I want to run a function either on the click of a
button
or on leaving a text box. For the immediate task, either will work as
well
as the other. I think.

I'm just at the beginning of this, and the form has two text boxes -
Text0
and Text1. The user input to Text0 is a dollar amount, in numbers. On
either
leaving the text box or clicking a button, I want to run a function to
convert the numerical value to the dollar amount in words, and then put
that
string into Text1. I copied a function for this purpose - it came from
the
mvps.org Web site. The function is named "English".

I'm not sure if the function is being called. I get the following error
message, whether I use a command button's "On Click" event, or the text
box
"On Exit" event -

The expression "On Exit" you entered as the event property setting
produced
the following error: Ambiguous name detected: English

Then it says -

*The expression may not result in the name of a macro, the name of a
user-defined
function or [Event Procedure].
*There may have been an error evaluating the function, event or
macro.

I can't tell what is ambiguous. The function does use a variable named
"English" - is that possibly the conflict? I've never used a function,
except in a Saturday morning class a few years ago, so my troubleshooting
skills aren't of much use here. Please be gentle, and thank you.
Steve E.


May 2 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.