Solved

Mask Edit

Posted on 2001-08-22
12
283 Views
Last Modified: 2008-02-20
Hi
  How could I use the mask edit to have the following input format.

  + or - 999.999999

ex          +156.894677
              -34.222

Any help is greatly appreciated.

Thanx

Dylan
0
Comment
Question by:b3cf
  • 5
  • 3
  • 2
  • +2
12 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 6414866
I don't think that the Masked Edit Control has that level of flexibility.  However, you can write code in the KeyPress Event of a standard text box that could accomplish the same thing (that is, only allow a "+" or "-" as the first entry, and then only allow digits or a decimal point (only one) after the first KeyStroke.

0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6414908
Put this in the format property

+#,###,###.########;-#,###,###.########
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6414911
This has the format of 3.6 as you wanted

+###.######;-###.######
0
 

Author Comment

by:b3cf
ID: 6414940
Hi Dave
  It didnt work, I need the mask.
0
 

Author Comment

by:b3cf
ID: 6414961
Hi Dave
  It didnt work, I need the mask.
0
 

Author Comment

by:b3cf
ID: 6414999
Hi Dave
  It didnt work, I need the mask.
0
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!

 
LVL 8

Accepted Solution

by:
Dave_Greene earned 50 total points
ID: 6415045
Ok, set your med box up like so

Format = +###.######;-###.######
Maxlength = 11
Mask = &###.######

should work.
0
 
LVL 1

Expert Comment

by:sanjeevjain1973
ID: 6416014
Dave Greene

After Setting
Mask = &###.######

Thne you can time any charecter like a,b,c,......


Sanjeev
0
 
LVL 39

Expert Comment

by:appari
ID: 6416234
set mask property to -999.999999
0
 
LVL 39

Expert Comment

by:appari
ID: 6416246
ignore my previous posting

use mask as 9###.######

but this accepts digit value at the 1 st digit place where mask is 9. need to write code to suppress that in keypress if first digit is other than +/- then make keyascii=0

0
 

Author Comment

by:b3cf
ID: 6417361
Thanx Dave. Thanx everybody else who contributed.

Dylan
0
 

Author Comment

by:b3cf
ID: 6419045
Thanx Dave. Thanx everybody else who contributed.

Dylan
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…

757 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

16 Experts available now in Live!

Get 1:1 Help Now