?
Solved

Apex True DBGrid Pro 6.0 Edit Mask Question

Posted on 2000-04-13
5
Medium Priority
?
1,605 Views
Last Modified: 2012-06-27
I am using a Apex True DBGrid Pro 6.0, and in one of my columns I need to only allow the users to enter a maximum of 7 digits.  I tried using the code below:

  With dbgTransData.Columns("Case Num")
    .Width = 1100: .Caption = "Case Num": .Alignment = dbgRight
    .EditMask = "#######": .NumberFormat = "Edit Mask": .HeadAlignment = dbgCenter
  End With

The code works as far as only allowing the user to enter 7 digits but I need the default value to display as "0000000".  The code above displays a default value of "0" centered in the column.  

Any ideas on how to get what I am trying to accompish to work?
0
Comment
Question by:jasonboetcher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:Gordonp
ID: 2711812
Cant speak for the grid your talking about, but if EditMask works the same way as the Format function then the EditMask your looking for would be

..EditMask = "0000000"

Dont know if it'll work but its worth a go.

Gordon
0
 

Author Comment

by:jasonboetcher
ID: 2711891
Didn't work Gordon.  The column data did display as "0000000" but it would not allow me to edit the data.  Thanks for the idea though.
0
 
LVL 3

Expert Comment

by:Gordonp
ID: 2711906
Never Mind Eh!
0
 
LVL 3

Accepted Solution

by:
Maxim10553 earned 100 total points
ID: 2712279
The column object has a property called Datawidth. This is of type long and defaults to 0 which imposes no size restrictions. Set this value to 7 and your problem should be solved.
0
 

Author Comment

by:jasonboetcher
ID: 2713026
Thanks!! Works great.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…
Suggested Courses

777 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