Prevent user to type on Autonumber

  • Thread starter Frank Situmorang
  • Start date
F

Frank Situmorang

Hello,

Although it says autonumber, users have tendency to type it. My question is
how can we prevent the user to type it ( unable to type that field in the
form) even we can assign the cursor passes it go to the next field.

Thanks in advance
 
J

Jeanette Cunningham

Make the control locked.

In design view, select the control,
on property dialog | Data tab | Locked - set to true

Jeanette Cunningham
 
F

Frank Situmorang

Thanks Jeannette for your quick answer. But will it not make autonumber not
to work?/update the table?
 
J

Jeanette Cunningham

Setting it to Locked, stops users from changing it only. Behind the form it
will work as normal, only the user is prevented from interfering where they
are not welcome.
Test it out. Set it to Locked and test it with a new record and see how well
it works.

Jeanette Cunningham
 
K

Klatuu

Jeanette is pretty much correct. It would also be useful to set the Enabled
property to No, also, so tabbing will bypass it.

But, I do not allow users to see autonumber fields. I have them on the
form, but made Not Visible and no tab stop. There is absolutely no reason
for an autonumber field used as a primary key to by visible to a user.
 
L

Linq Adams via AccessMonster.com

While Klatuu's advcie about even showing an autonumber is spot on, I'm
confused by the queation itself! An Autonumber is never editable, whether you
explicitly "Lock" the field or not!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
 

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