Unanswered: Disabling a Text Box after user entry?
Hi Guy and Gals,
I have come a cross a problem that I hope you can help with, I have a form which users enter additional information into.
I am looking for a way of setting a text box to disabled when the field is not empty/has a value, as the text or value entered into this box will not be standardised (I assume this would be achieved via the AfterUpdate & onCurrent properties of the text box).
I do not want to "lock" the entry in the table just disable or lock (prefer disable so it greys it out) the field on a form so once it is filled only a user with access to the table of an "edit" form can alter its contents.
The hope is that once the user enters a value and saves the record (already have a script that will undo any changes with a prompt "Do you wish to save - No will clear any additions to this record, Yes will save & close form" would like to add a cancel option in future), that field will automatically be disabled and not allow any changes or additions to it.
Not that I am aware of. You can, however, modularise. Use ActiveControl rather than being specific about which control you're working with and then you should be able to minimise the amount of repeated coding.
I have tried simply changing the name of the current txtbox code that is working to "ActiveControl", which doesn't work, do I need to set it from me.ActiveControl to screen.ActiveControl? And if so what other conditions do I need to set?