Ms Access Input Box

Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc used Ask the Experts™
on
For the point of sales app I want to use the input box because for Tax purpose because the tax rate keep on changing year in year out , what I want to do is to hard code the txttax control to be only receiving percentages not absolute values , how do I do it? For example I want to be seeing rates like 10% , 16% etc whatever is applicable not values like 10,16 etc.

Private Sub ProductID_AfterUpdate()
Dim s As String
s = InputBox("Tax Value required", "Internal Audit Manager ", "Tax Percentange")
Me.txtTax = s
End Sub

Regards

Chris
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
You can use:

Me!txtTax.Value = Val(s) / 100

Open in new window

and then set the Format property of Me!txtTax to: 0%
Thank you so much it has worked!

Regards


Chris
Most Valuable Expert 2015
Distinguished Expert 2018

Commented:
You are welcome!
Dale FyeOwner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010

Commented:
Strongly disagree with this concept. Allowing (requiring) users to enter this data is a recipe for error and corruption.

Tax rates should be stored in tbl_TaxRates which includes columns like:

Locality - may not be needed
Type - (state, local, ...)
Rate
EffectiveDate
ThruDate

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial