Solved

Mask Edit

Posted on 2001-08-22
12
309 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

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
 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 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