Q: Anything but comma mask in textbox

M

MarkD

Using Access 2000

Hey all,

I need to create a csv file from a query. The csv CANNOT
have text qualifiers (believe me, I've argued that this is
silly, but the program importing this data is proprietary)

I created a function to return a string without the
commas, but I'm wondering if there's a way to remove
commas during data entry by using the input mask.

If not, I was thinking I could just do this on AfterUpdate:
Me.ActiveControl.value = RemChars
(Me.ActiveControl.value,",")

where remchars is my function that will remove the commas.
Is this how you developers would approach this, or would
you do it a different way?

Thanks,
-Mark
 
K

Ken Snell [MVP]

Input mask will not be an approach that would be useful. Using AfterUpdate
event to run code that removes commas is how I would approach this issue.
 
M

MarkD

Thanks much,

It's good to know that other developers would approach it
the same way, especially MVPs.

-Mark
 
D

Dirk Goldgar

Ken Snell said:
Input mask will not be an approach that would be useful. Using
AfterUpdate event to run code that removes commas is how I would
approach this issue.

An alternative might be to use the control's KeyPress event to identify
commas as they are pressed and simply discard them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top