currency to text not working

A

Amir Surani

Hello All,

I am absolutely new on MS Access.
I have a table with two fields as follows


1) Name --Text
2) Salary -- Currency
I wish to show the Currency Field as text. I have already downloaded the
code from DevAshish website to convert the currency to text and added it as
a Module.

On the form I have added a text box and set its control property to
=ConvertCurrencyToEnglish(salary), but it shows #Name, instead of the
currency figure in text ex. my salary column is 123, so it should show One
Hundred Twenty Three.

I have tested the module in the Immediate Window and it works fine.. But it
show #Name on the form..

What am I doing wrong?

I have searched the newsgroup and also downloaded a sample file.. but since
I am a beginner I cannot get the ball rolling.

Would somebody help me with my above database where in I want to show the
Salary field as text using the ConvertCurrencyToEnglish module?

Thanks in advance

Rashid Khan
 
C

Cheryl Fischer

Is the Control's Name "Salary" (without quotes)? Try changing the Name
property of this control to txtSalary.
 
R

Rashid Khan

Thanks Cheryl. It worked fine after changing the Name property to
txtSalary. However, I forgot to mention that I am using Access 2002

Your help made my day. Thanks once again.


Rashid Khan
 
R

Rashid Khan

Hello Cheryl,

One thing more I wanted to say that the file which I downloaded from
Microsoft Site (Northwind database), does not have the name with the prefix
'txt' (without quote). So can u think what could be the reason for the code
not to work. However, when I chnged the name to txtSalary it worked fine.
But still I was curious that why it was not working previously. Any ideas?
I just checked the Northwind Database sample file and the Name property is
just mere Text21


Anyway, thanks a lot once again

Rashid Khan
 
C

Cheryl Fischer

Rashid,

The 'key' to resolving this issue is that the Name of your calculated
control may not be the same Name as any Field in the query or table which
underlies your Form or Report. We could have renamed your calculated
control to pretty much anything, as long as that new name did not equal the
name of a field in the query or table.

hth,
 
F

Fredg

Amir,
Regarding:
I have a table with two fields as follows


1) Name --Text

I would strongly advise you to read the Microsoft KnowledgeBase
article for your version of Access:

109312 'Reserved Words in Microsoft Access'
209187 'Acc2000: 'Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'

'Name' is a reserved word and should not be used as a field name.
 
A

Amir Surani

ok thank you very much.
Rashid
Fredg said:
Amir,
Regarding:

I would strongly advise you to read the Microsoft KnowledgeBase
article for your version of Access:

109312 'Reserved Words in Microsoft Access'
209187 'Acc2000: 'Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'

'Name' is a reserved word and should not be used as a field name.

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
 

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