Decimal settings in access 07

D

David

I have Vista64/Access 07. Within a form that i have, I used to be able to
input "123" and get "$1.23" in a currency field. Now, when I input "123",
it give me "$123.00" which is not what I want. I would like to return to
access moving the decimal to the left 2 places so that I will get "$1.23".
Any suggestions?
Thank you.
 
A

Arvin Meyer [MVP]

In the code for the AfterUpdate event of your textbox, use something like
untested:

Me.txtWhatever = Format(Me.txtWhatever / 100, "Currency")

substitute the name of your textbox for txtWhatever
 
D

David

Thank you for your help. As I do not make it a habit to write code, could
you direct me as to where I do this exactly in Access?
David
 
A

Arvin Meyer [MVP]

Step-by-step

1. Open your form in Design View
2. Select the textbox
3. Open the form's property sheet
4. Click on the Events tab of the property sheet
5. Click in the After Update event box
6. Select [Event Procedure]
7. Click on the ellipses (...) button

You will see a code stub like:

Private Sub txtWhatever_AfterUpdate()

End Sub

8. Add the line of code between the 2 lines you see.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 

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