using enabled property

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

Guest

i have a numeric field in a form where i enter numbers someone keeps
deleting numbers in certain fields i want to use the enabled property so
that when a number is entered and then you tab to the next field it greys it
out and you cant change it anymore. i can do it with a text field like this

me. Me.fieldname.Enabled = Len(Me.fieldname & "") = 0 how can i do it
with my numeric fields ? im sure its simple im having a brain fade
 
it locks the field right away i need to enter data into it and then when i
tab off it will lock
 
dlb1228 said:
i have a numeric field in a form where i enter numbers someone keeps
deleting numbers in certain fields i want to use the enabled property so
that when a number is entered and then you tab to the next field it greys it
out and you cant change it anymore. i can do it with a text field like this

me. Me.fieldname.Enabled = Len(Me.fieldname & "") = 0 how can i do it
with my numeric fields ? im sure its simple im having a brain fade


Me.fieldname.Enabled = IsNull(Me.fieldname)
 
i have a numeric field in a form where i enter numbers someone keeps
deleting numbers in certain fields i want to use the enabled property so
that when a number is entered and then you tab to the next field it greys it
out and you cant change it anymore. i can do it with a text field like this

me. Me.fieldname.Enabled = Len(Me.fieldname & "") = 0 how can i do it
with my numeric fields ? im sure its simple im having a brain fade

I'm confused. And I'm concerned for your users.

Are you saying that they must get ONE CHANCE ONLY, ever? and that if
they make a mistake, tab off the field, and realize that they made a
mistake, that they are to be prohibited from correcting that mistake,
ever?

I suspect there must be a better way to solve your business problem;
it might be better user training, or validating the data in the Form's
Beforeupdate event, or *something*, but locking a field the instant
you leave it seems really draconian!

John W. Vinson[MVP]
 
Back
Top