Solved

Set value in a masked edit box.... -- Easy 500!!! --

Posted on 2006-07-05
4
186 Views
Last Modified: 2008-03-06
Im trying to set a value in a maked edit box.... I keep getting an Invalid property Value

Mask = "$0.00"
Format = "$#,##0.00"

Trying to set the value in code with txtRefundGst = 0 where txtRefundGst  is the MEB

HEEEELLLLPPPP!!!!!



0
Comment
Question by:ExtremeFitness
  • 2
  • 2
4 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 17044125

It's not clear what you expect. The mask of $0.00 means that that is the only value that is legal. Try $#.##.
Also you must conform to the mask. Manually it will beep at you, Programatically it raises an error.

So you need
txtRefundGst.Text = "$0.00"
0
 
LVL 2

Author Comment

by:ExtremeFitness
ID: 17044146
Im trying to ver any valid currency.....  
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 17044322
If you are only going to fill it programatically, it would be easier to have a blank Mask.

The format will still work.
txtRefundGst.Text = 1.234
will display as $1.23 if you keep the Format as "$#,##0.00"

If not, you might want to use a mask that is at least as long as the Format:
$9,99#.##
Would be a good match.


0
 
LVL 2

Author Comment

by:ExtremeFitness
ID: 17044452
Ok maybe the Masked edit box is not for me... :)
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

746 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now