Converting currency value to text value for bank checks.

B

Bardia

I fill and print Bank Checks using Access 2003. As you know Checks have two
fields for currency. One for number ($21.00) currency and another for text
currency (Twenty One Dollars). How can I Program the text field to look at
the currency number field and covert its value to text and fill the text
value field.
 
B

Bardia

Thank you, but this article applies to
Microsoft Access 1.0 Standard Edition
Microsoft Access 1.1 Standard Edition
Microsoft Access 2.0 Standard Edition
Microsoft Access 95 Standard Edition
Microsoft Access 97 Standard Edition
while I am using Access 2003 professinal
 
M

MikeB

Why don't you give it a shot anyway....???

Bardia said:
Thank you, but this article applies to
Microsoft Access 1.0 Standard Edition
Microsoft Access 1.1 Standard Edition
Microsoft Access 2.0 Standard Edition
Microsoft Access 95 Standard Edition
Microsoft Access 97 Standard Edition
while I am using Access 2003 professinal
 
J

John W. Vinson

Thank you, but this article applies to
Microsoft Access 1.0 Standard Edition
Microsoft Access 1.1 Standard Edition
Microsoft Access 2.0 Standard Edition
Microsoft Access 95 Standard Edition
Microsoft Access 97 Standard Edition
while I am using Access 2003 professinal

It still works just fine.
 
B

Bardia

Thank you Gina. I am novice could you please walk me through the process for
using the Joe Foster code. I need step by step direction.
 
B

Bardia

Thank you, I am novice and will appreciate your step by step instruction from
where to start and where to end.
 
G

Gina Whipp

1. Create a new module, type Option Explicit if not there...
2. Copy the code from the link into the module and name the module anything
but the name of the Function, ie: mdlMoneyToText...
3. Then where you want to convert the currency to text use
English(YourCurrencyField)

Please note, this one shows cents as 24/100. If you want to use twenty four
cents then use the one suggested by Beetle because it will and does work in
Access 2003. To use the one suggested by Beetle follow the same directions
as above.
 
J

John W. Vinson

Thank you, I am novice and will appreciate your step by step instruction from
where to start and where to end.

Go to
http://www.mvps.org/access/modules/mdl0001.htm.

Create a new Module in your database. Copy and paste the code (between the
asterisk lines) from the webpage into the module. Select Debug... Compile and
correct any errors (post back if you need help doing so). Save the module as
some name *other* than English (basNumberWords let's say).

Create a Query based on the table from which you wish to print checks. In a
vacant Field cell type

AmountInWords: English([Amount])

using your actual fieldname in place of Amount.

Use this Query as the recordsource for a report to print the check.
 
G

Gina Whipp

Hmmmm, forogt the whole 'Create a Query' thing...

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

John W. Vinson said:
Thank you, I am novice and will appreciate your step by step instruction
from
where to start and where to end.

Go to
http://www.mvps.org/access/modules/mdl0001.htm.

Create a new Module in your database. Copy and paste the code (between the
asterisk lines) from the webpage into the module. Select Debug... Compile
and
correct any errors (post back if you need help doing so). Save the module
as
some name *other* than English (basNumberWords let's say).

Create a Query based on the table from which you wish to print checks. In
a
vacant Field cell type

AmountInWords: English([Amount])

using your actual fieldname in place of Amount.

Use this Query as the recordsource for a report to print the check.
 
B

Bardia

Thank you John, I deeply appreciate your help.
I followed your instruction, created new class module and named it
CheckText. Then created new Query and in a vacant field cell typed
‘AmountInWords: English([Amount]) ‘. Now I have one problem and two questions.
Problem: when I run this Query I get the error message “Undefined function
‘English’ in expressionâ€
Question 1. You instructed that instead of word Amount in expression I
should use actual field name. Are you telling me that I use the field name of
a form that currency in alphabet should be filled?
Question 2. I do not understand how the new created module will relate to
this new Query.
Please advice

--
Bardia


John W. Vinson said:
Thank you, I am novice and will appreciate your step by step instruction from
where to start and where to end.

Go to
http://www.mvps.org/access/modules/mdl0001.htm.

Create a new Module in your database. Copy and paste the code (between the
asterisk lines) from the webpage into the module. Select Debug... Compile and
correct any errors (post back if you need help doing so). Save the module as
some name *other* than English (basNumberWords let's say).

Create a Query based on the table from which you wish to print checks. In a
vacant Field cell type

AmountInWords: English([Amount])

using your actual fieldname in place of Amount.

Use this Query as the recordsource for a report to print the check.
 
J

John W. Vinson

Answers inline.
Thank you John, I deeply appreciate your help.
I followed your instruction, created new class module and named it
CheckText. Then created new Query and in a vacant field cell typed
‘AmountInWords: English([Amount]) ‘. Now I have one problem and two questions.
Problem: when I run this Query I get the error message “Undefined function
‘English’ in expression”

Does the Module include the line

Function English (ByVal N As Currency) As String

from the webpage? After you copied and pasted the function into the Module,
Question 1. You instructed that instead of word Amount in expression I
should use actual field name. Are you telling me that I use the field name of
a form that currency in alphabet should be filled?

Forms don't have fields. Tables have fields. The function should be called
from a Query, by typing

AmountInWords: English([Amount])

Replace "AmountInWords" by the fieldname that you want to use for "Five
Hundred Dollars"; replace [Amount] by the fieldname currently in your table
which contains a Currency value such as $500.00.
Question 2. I do not understand how the new created module will relate to
this new Query.

The Query will call the function. The Module is just a container for the
function, and you won't need to use the "CheckText" module name anyplace -
just the name of the Function, which (unless you change it) is "English()".
 
B

Bardia

Very first line in module is "Function English (ByVal N As Currency) As
String ".
I used Debug compiled MyExpences which is the name of table and received no
error. Also changed the other two names as you instructed and again when I
run the Query I see the same error message “Undefined function
‘English’ in expressionâ€
--
Bardia


John W. Vinson said:
Answers inline.
Thank you John, I deeply appreciate your help.
I followed your instruction, created new class module and named it
CheckText. Then created new Query and in a vacant field cell typed
‘AmountInWords: English([Amount]) ‘. Now I have one problem and two questions.
Problem: when I run this Query I get the error message “Undefined function
‘English’ in expressionâ€

Does the Module include the line

Function English (ByVal N As Currency) As String

from the webpage? After you copied and pasted the function into the Module,
Question 1. You instructed that instead of word Amount in expression I
should use actual field name. Are you telling me that I use the field name of
a form that currency in alphabet should be filled?

Forms don't have fields. Tables have fields. The function should be called
from a Query, by typing

AmountInWords: English([Amount])

Replace "AmountInWords" by the fieldname that you want to use for "Five
Hundred Dollars"; replace [Amount] by the fieldname currently in your table
which contains a Currency value such as $500.00.
Question 2. I do not understand how the new created module will relate to
this new Query.

The Query will call the function. The Module is just a container for the
function, and you won't need to use the "CheckText" module name anyplace -
just the name of the Function, which (unless you change it) is "English()".
 
J

John W. Vinson

Very first line in module is "Function English (ByVal N As Currency) As
String ".
I used Debug compiled MyExpences which is the name of table and received no
error. Also changed the other two names as you instructed and again when I
run the Query I see the same error message “Undefined function
‘English’ in expression”

Very odd! Try changing the first line to

Public Function English(N As Currency) As String

Adding the "Public" and removing the blank before the parameters, and the
unneeded ByVal (that's already the default).
 
D

Douglas J. Steele

John W. Vinson said:
Very odd! Try changing the first line to

Public Function English(N As Currency) As String

Adding the "Public" and removing the blank before the parameters, and the
unneeded ByVal (that's already the default).

Might Bardia have inadvertently named the module English? Modules cannot
have the same name as functions.
 
B

Bardia

Problem is still there with undefined ENGLISH and I gave up. Thank you again
for your help. I wish you happy holidays and prosper New Year with greater
health and wealth.
 
J

John W. Vinson

Problem is still there with undefined ENGLISH and I gave up. Thank you again
for your help. I wish you happy holidays and prosper New Year with greater
health and wealth.

If you're willing, you could zip the frontend and email it to me: jvinson <at>
wysard of info <dot> com, edit out the blanks and fix the punctuation. We're
both missing something!
 

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