Advertisement

02.12.2006 at 01:23PM PST, ID: 21733768
[x]
Attachment Details

Format A Number to 2 decimal places VBA Access 2003 Easy

Asked by nomar2 in Microsoft Access Database

Tags: vba, decimal, format, access, places

I have a number pad on screen using VBA Access 2003 with  Sql Server
I click one of the buttons and a number appears in the text box.Hit a button again and the next number appends to the first and so on.  This works with no problem.

The client doesn't want a decimal button. So if i hit a "1" button and "2" button

"12" appears in the textbox

Under the click of a "Process" button I want the "12" ....to be read as 0.12

Other examples of numbers in the textbox
123  -> 1.23
1 -> 0.01
123454 - 1234.54

I have been fooling around with the Format currency function but it not giving me what I want

txtNumber.SetFocus
 lnTender = Format(txtNumber.Text, "Currency")

Any help or insight would be much appreciated.Start Free Trial
[+][-]02.12.2006 at 01:25PM PST, ID: 15936770

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.12.2006 at 01:25PM PST, ID: 15936775

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.12.2006 at 01:43PM PST, ID: 15936868

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Access Database
Tags: vba, decimal, format, access, places
Sign Up Now!
Solution Provided By: jimhorn
Participating Experts: 4
Solution Grade: A
 
 
[+][-]02.12.2006 at 02:05PM PST, ID: 15936973

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.12.2006 at 03:52PM PST, ID: 15937453

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32