Year Field

M

Mary

I am new to Access.

I want to add a field for entering Year.
1) Should I choose Text or Number ?
2) For input mask, can I use 0000
3) How can I check the range of year ?

Thanks
 
M

Mary

Yes, we only need the Year and it will not be negative.

Would you mind to give me some advice on the input mask
and how to check the range ?

Thanks
 
M

Mary

When I apply the input mask in the table, it doesn't work
properly. Should I apply the input mask in the form ?
Instead of giving error message "value entered invalid for
input mask 0000", can I change this message to become more
meaningful ?

Besides, how can I limit the year entered ? For instance,
between 1980 and 2099 ?

Thanks
 
L

Larry Linson

Use a validation rule for the Field or for the Control, or put VBA code in
the Before Update event, with which you can be a little more
"user-friendly".

Larry Linson
Microsoft Access MVP
 
A

Arvin Meyer

A mask does not go with the data. That is it only changes the way the
data is displayed in the specific form report etc to which it is applied.
So yes you need to apply it where you want the data to appear as four
characters.

You are, perhaps, confusing the Format property with an Input Mask.
Formatting changes the way data is displayed without changing the data
itself. An InputMask changes the way data is entered.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Top