Re: I want to lock a field after Update

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Tried it again it didn't give me an error but it didn't work. I am still
locked out to the field. I guess because the record is not new. Who ever
initiates the correspondence actually chooses the Approvers. What if I use
somesort of Not Null on the actual fields? Do you think that would work.


"Klatuu" <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E50935E9-2AF1-4DD1-9516-54CF93F98A89@xxxxxxxxxxxxxxxx
> What error did you get? It would be helpful to know that. The only thing
> I
> see that could cause the error is the name of the control. Since I don't
> know what your control name is, I made one up.
>
> The NewRecord Property is to know if the current record is a new record or
> not. If it is a new record, then the code above should unlock the
> controls.
> When you navigate to an existing record, it should lock the controls.
>
> Also, are you using date and time for you data? If you don't need the
> time,
> you could use just Date, Now returns data and time.
>
>
> "Klatuu" wrote:
>
>> Try this in the Current event of the form:
>>
>> Me.txtDateStamp.Locked = Not Me.NewRecord
>>
>> "debbie" wrote:
>>
>> > I have a form that automaticly puts a date stamp in when clicked on. I
>> > want
>> > to lock it after the first date stamp so that the date can not change
>> > but
>> > everything I have done either locks or unlocks it. Can someone help?
>> >
>> >
>> >


.



Relevant Pages

  • RE: Conditionally locking fields
    ... 'if the control you want to lock or unlock is on the main form ... 'you would add one of the above statements for each control on the ... SetCtrlsStatus False ...
    (microsoft.public.access.forms)
  • Re: NadaNet for the //c - just an idea
    ... chip/etc before/after each packet to be sent/received? ... control over write protect with the drive still running, ... properly *throughout* a whole request. ... able to write to the net to assert its lock). ...
    (comp.sys.apple2)
  • RE: Form when populate execute code
    ... 'Unlock Everything ... 'Lock Everything ... Dim c2 As Control ... Using Windows XP pro latest patch ...
    (microsoft.public.access.formscoding)
  • Re: set combobox properties for subform on another tab
    ... with a tab control. ... Tab1 is a subform with a checkbox. ... subform to "Mandated" and lock it. ... After you get the proper value assigned to the combo box, ...
    (microsoft.public.access.formscoding)
  • Re: Prevent edits - unexpected effects
    ... No editing has begun at this stage, so there is no danger, (unless you are also assigning a value to a bound control in Form_Current.) ... When you click the button to lock the form, it attempts to save the record before doing anything else. ... Or did you misunderstand and use the AfterUpdate of the control instead of the form? ... were to click the 'Complete' checkbox on a new record w/o first having ...
    (microsoft.public.access.forms)