Using input mask, filter by form

C

CurtainMary

Using Access2003-SP3
I am using an input mask for entering sample numbers in a precise way. I
would like this input mask to be active when searching for a particular
number. Is there a way?
Thanks
 
K

Klatuu

Input masks and Formats have no effect on how data is stored in a table
field. Input masks are useful only for controlling what is entered in a form
control. Formats are only for presenting values to users the way you want
them displayed. One other use for formatting is for comparing data in
dissimilar data types.
 
C

CurtainMary

Thank you for taking your time to answer.
Actually my input mask causes the table to store say: A nnnn/yy and not
Annnn/yy, which is why I thought when using Filter by Form might
automatically ensure the casual searcher to force the correct format as it
does for the data entry.
 
K

Klatuu

What data type is the table field the control is bound to?
Also, please post the input mask you are using.
Maybe we can correct your problem.
 
C

CurtainMary

Thanks again for looking at this.
DataType is Text
InputMask is >L\ 000/00;0;
Cheers from down-under
 
K

Klatuu

I made an incorrect statment. An input mask can affect how data is stored in
a text field. My original statement was based on the fact you said you were
entering numbers and I had not seen your mask at the time. Seeing that it is
obvious it is for text.

The reason you are getting A nnnn/yy and not Annnn/yy is because the way
you input mask is written. There is a space right after the first \ That
causes a space to be included in what is stored.

v-----space is here
L\ 000/00;0;
^----- second parameter

The 0 in the second parameter causes the / to be stored in the field.
To be able to search for that value, you will have to force entry that will
search for the string with the value as entered in the field.

How are you trying to do the search?
 
C

CurtainMary

Thanks again for sticking with me.
I wasn't specific enough and made an error, I want the field to show A
nnn/yy which is activated by the mask when data is entered and it does.
When entering new data there is no need to add the space after the A nor the
/ after the nnn, the mask takes care of that.

I want to search for a past record through "Filter By Form".
and I would like the input mask to be active so that operators don't have to
enter the space after A nor the / after nnn.
 
K

Klatuu

To use an input mask on a search, you will have to use a text box and perform
your own filtering rather than the filter by form. You don't have as much
control with filter by form.
 
C

CurtainMary

Thank you. Now I know I can't do it, I have designed a form with a text box
with the input mask and programmed a button to take me to the record.
Much obliged for you staying with it.
Thank God for MPVs !!
 

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