Displaying Currency

D

David

I have a Table with a field to hold the "Rate" for a Jobe or the work "Price"
if it is a fixed price. Because of this the field is set to "Text".
On a form I have a bound Textbox to the field.
I would like the Textbox to display the "Rate" as Currency but because it is
Text it cannot do this even though the Textbox is set to Currency.
If I Unbind the Textbox and fill it in Code I can check for the word "Price"
and convert anything else before entering the data. As there are quite a few
Textboxes on the form I would prefere to formate the bound Textbox if
posible. Does anybody knoe if this can be done or have I got to programe each
Textbox.
 
T

Tom van Stiphout

On Wed, 24 Mar 2010 03:32:01 -0700, David

I think you need an additional field: UnitPrice (currency), and
another one Units (probably integer if you bill in hourly increments).
Both are required fields.

For "Rate" work you may have UnitPrice=$50, Units = 100.
For "Price" work you may have UnitPrice=$3000, Units=1 (per
definition).

-Tom.
Microsoft Access MVP
 
A

Arvin Meyer [MVP]

Code is the way to go here. Write a standard module function using:

Screen.ActiveControl

and if there are other terms than "Price" use an argument and a Select Case
statement.

Now, select all the textboxes on your form, open the property sheet and on
the event tab, go to the GotFocus event and add:

=FunctionName()

substituting you function name, of course. If you do have arguments, you'll
need to do them separately.
 

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