Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / March 2006

Tip: Looking for answers? Try searching our database.

using enabled property

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dlb1228 - 13 Mar 2006 18:25 GMT
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
Klatuu - 13 Mar 2006 18:40 GMT
Me.FieldName.Enabled = IsNull(Me.FieldName)
Works regardless of data type.

> 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
[quoted text clipped - 3 lines]
> 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
dlb1228 - 13 Mar 2006 18:49 GMT
it locks the field right away   i need to enter data into it and then when i
tab off it will  lock

> Me.FieldName.Enabled = IsNull(Me.FieldName)
> Works regardless of data type.
[quoted text clipped - 6 lines]
> > 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
Marshall Barton - 13 Mar 2006 19:02 GMT
>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
[quoted text clipped - 3 lines]
>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)

Signature

Marsh
MVP [MS Access]

John Vinson - 13 Mar 2006 22:32 GMT
>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
[quoted text clipped - 3 lines]
>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]    
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.