%

  • Thread starter Thread starter Chi Huynh
  • Start date Start date
C

Chi Huynh

Hi,
In my data entry form, I have a field named percentage
discount.
The problem is when I entered 10%, it automatically
changed to 1000%.

If I entered 0.10, it is ok (it will show 10%)

I think that it is not convenience for users. Therefore,
please show me how to fix the problem.


Thank you
Chi Huynh
 
Chi,

You could use the Before Update event of the control on your data entry form
to automatically divide the user entry by 100, so the user still keys 10,
and Access changes it to 0.1, which displays 10%.
You can do so by means of a macro:
Action: SetValue
Arguments:
Item: ControlName
Expression: [ControlName] / 100
Condition: [ControlName] <>0

Or a single line of vbCode:
If Me.ControlName <> 0 Then Me.ControlName = Me.ControlName / 100

In any case, just change ControlName to the actual name of your control.

HTH,
Nikos
 

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

Similar Threads

Meeting Request 4
Excel - Formatting 8
Percentage 2
calculation 5
Percentage 2
Alphabet order 2
I don't want the recipients to reply my message 1
Parameter Criteria 3

Back
Top