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



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

Steve E.



"Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx> wrote in message
news:44570964$0$16942$5a62ac22@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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" <Serious_PractitionerNOSPAM@xxxxxxx> wrote in
message
news:fhx5g.15933$Fs1.13583@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.







.



Relevant Pages

  • Run a function from "On Click" or "On Exit"
    ... I'm having trouble ... The expression "On Exit" you entered as the event property setting ... the following error: Ambiguous name detected: English ... *There may have been an error evaluating the function, event or macro. ...
    (comp.databases.ms-access)
  • Backing up Access 2007 database with a macro
    ... trying to make a macro for backing up my database by using the exit button on ... I'd like to have my exit button run a macro which before ...
    (microsoft.public.access.macros)
  • Re: Run a function from "On Click" or "On Exit"
    ... Presumably you are talking about this English() function: ... If nothing is visible, try compacting the database: ... The expression "On Exit" you entered as the event property setting ... *There may have been an error evaluating the function, event or macro. ...
    (comp.databases.ms-access)
  • Compact database
    ... How do you write a macro which will automatically compact a database on exit? ...
    (microsoft.public.access.macros)
  • Re: Compact database
    ... You can't compact the current database with a macro. ... > on exit? ...
    (microsoft.public.access.macros)