Solved

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

Posted on 2006-07-05
4
190 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

679 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