views:

31

answers:

1

i have an access front end for a sql server database

my question is: is it possible to format/input mask the data in a datasheet before it goes into the DB?

for example, if i want to enter zip codes into the database. is it possible to set the length in ACCESS to be only 5 digits? how about a phone number?

+1  A: 

Create a form for the data source. With a form, you can assign properties to the form's controls: Input Mask; Default Value; Validation Rule. Furthermore, you can do more complex validation with the control's Before Update event. You could also do validation from the form's Before Insert or Before Update events.

If you want to limit the length of data in a character field, consider enforcing that requirement in the back-end database. But for the specific example of zip codes, a 5 character limit would not allow U.S. expanded zip+4 codes.

HansUp