Home > Microsoft Access Help > field modification

field modification



How can i make sure that once information had been entered in a field in ms access 2000 the user cannot modify it? for example:

I need a customer ID to be entered and make sure that the users cannot modify it, in other words i need the field to be disable as soon as the user had entered the information.



Any idea is really appreciated it. thanks.

    
Guest


How are you having the users enter the data, are they entering throught the use of forms or directly into the table itself.



With forms add the following code to the text box in the after update action when adding the new record.also do this prior to allowing them to edit the record



text1.locked = True







Remember to set locked back to false prior to adding a new customer id

Was this answer helpful ? Yes No   
Guest


Put this in the OnCurrent Event in your Form



If Not (IsNull(Text1)) Then

Me.Text1.Locked = True



Else



Me.Text1.Locked = False



End If



Regards,

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved