disable field update in a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to disable editing of a field in an updateable form without using the
enabled property. I don't want the field data to appear greyed if I can help
it,
prefer to just cancel the event for updating.

on this note, when you change data in a cell and Access automatically saves
the record which event does it do this in? the lost focus, change event?

thanks

Chris
 
If you set the control to Enabled=False and Locked=True, it won't show as
grayed out and the user cannot click on it or tab to it.
 
Neither of the events. Your best approach is to lock the textbox for the
field. At whatever point you know you don't want the field updated, put this
line in an event:
Me.txtYmField.Locked = True
It will have to be before the texbox gets the focus.
This will not grey it out, you just wount be able to modify the data
currently in the text box.
 
Back
Top