Missing literal characters in Input Mask

A

Aaron

Hello,

I need a user to enter data in a text field on a form in the following
format; "ABC - 123".

I have coded the input mask using VBA as such,

Me!Standard.InputMask = "LLL\ \-\ 000"

Where 'Standard' is the text field on a form which has a control source
called Standard from a table.

When the user inputs the data in the Standard field, the input mask works as
desired but for some reason the Standard is saved in the table in a different
format. The text is saved in the table as "ABC123" rather than "ABC - 123".
For some reason the " - " is getting cut out. The 'Standard' field in the
table is a text field. I am using MS Access 2003 with SP3 installed.

Thank You for your time and effort in advance,
Aaron
 
D

Damon Heron

Maybe you should have used the wizard to complete the new input mask for
you. The last screen allows you to store the data with or without
formatting.

Damon
 
A

Aaron

Thank you very much for the suggestion and it worked,

However, I should have mentioned that it is necessary to create the input
mask through VBA coding because the Input mask is dependent on the value of
other value boxes on the form. I noticed in the wizard that you can display
your inputmask "with the symbols in the mask, like this 'ABC - 123' ".

Is there way to somehow access or use this option using MS Access VBA?

Thanks again for your time and effort,
Aaron
 
A

Aaron

Thanks for your help, but after playing around, having the ;0 finally worked.
For some reason it wouldn't read it before. Thanks!
 

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