Solved

Apex True DBGrid Pro 6.0 Edit Mask Question

Posted on 2000-04-13
5
1,576 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 25 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

726 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