473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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
2 4818
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Smith | last post by:
I have more than 4,000 pieces of email in my Yahoo account. I would like to write a program to download them all. In order to write such a program, I need to know a few things. 1. After I fill...
1
by: Bob Alston | last post by:
I am trying to highlight required data fields in a continuous form situation. Got it working for all but date fields. For date fields, I am trying setting default date to -1 (=12/29/1899) and...
1
by: Boni | last post by:
Dear all, I have a question about TreeView elements. is it possible to differentate double click on TreeNode itself from double click on "+" of this TreeNode? Thanks in advance, Boni
2
by: Kikoz | last post by:
Hi all. I'm using one PC/XP Pro as my development environment. Its IIS has one default web site, of course, which is the site I'm working on. When some feature is finished I deploy it to my...
4
by: MDW | last post by:
Hey all. I'm confused. I'm trying to add a single record into an Access 2000 database using ASP.Net. Here is the code: objConn = New OleDbConnection(strConnect) objConn.Open objCommand =...
6
by: Alan Silver | last post by:
Hello, I have a page that displays a data list with info from a database. The grid has the usual stuff, edit, update, delete etc. Below this I have a section where they can add a new entry to...
2
by: Benny Raymond | last post by:
I was looking through the options and only saw this type of default for XML and HTML - but what about C# forms and what not - is it possible to default these to View Code? Thanks, Benny
1
by: ranabhavin2 | last post by:
Hi, on button click I want to open new window each time. Currently when I m click on button second time then my new window is replaced with my original window. We can do it in hyperlink by ...
8
by: Grorange | last post by:
Writing ASP.NET pages, I have a need for client-side functions to prevent going to the server for every small change. I have a list of server side created checkboxes filled with a lot of...
3
by: ysakaed | last post by:
Hi I am trying to get the content of the iframe to replace the content inside a div here is the code i use. function changeContent(content) { var buf = content + "_2"; var iframe =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.