Solved

Format Text

Posted on 2006-11-26
3
140 Views
Last Modified: 2010-04-30
A text box get the text from and access database which in turn get the data from a DBF database, Anyhow one of the fields of this data supposed to have  a price which means like 2.45 or 4.67 etc..  however this data get into access without the decimal place and when I get into Visual basic also get without the decimal place. How can I get this format into a 2.45 or 4.67 etc into a textbox, knowing that always there two decimals. I don't want to touch the access or DBF databases I want to deal directly with VB and the textbox format
0
Comment
Question by:teogos
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 125 total points
ID: 18016338
Hi teogos,

TheForm.TextBox1.Text = Format(DatabaseField / 100, "#,##0.00")

Regards,

Patrick
0
 

Author Comment

by:teogos
ID: 18016383
Thanks
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 18016420
teogos,

You're welcome :)

Regards,

Patrick
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA error replacing data 6 39
Best way to parse out a json string in VB6? 10 164
Question about INSTR  - need to extract data MS ACCESS query 6 54
MsgBox 4 59
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question