RE: lock a control on a form

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

From: Jason (anonymous_at_discussions.microsoft.com)
Date: 07/19/04


Date: Mon, 19 Jul 2004 09:00:10 -0700

Thanks, but I still receive the same error Any other
ideas.
>-----Original Message-----
>
>
>"Jason" wrote:
>
>> I am attempting to lock a control on a form unless a
user
>> is entering a new record, in which case I want the
control
>> to be unlocked. I am using the following code:
>>
>> Private Sub Report_Project_Change()
>> If Forms![Valuation].NewRecord = True Then
>> Me!Counterparty.Locked = False
>> Else
>> Me!Counterparty.Locked = True
>> End If
>>
>> End Sub
>>
>> When I try this, I receive an error stating that the
>> object doesn't support this property or method. What
am I
>> doing wrong?
>>
>> Thanks for your help,
>> Jason
>>
>Try this:
>
>If Me.NewRecord Then
> Me!Counterparty.Locked = False
>Else
> Me!Counterparty.Locked = True
>End If
>.
>



Relevant Pages

  • 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: 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)
  • Re: Form when populate execute code
    ... it's just an example) when it's finish we change the ticket status from ... the code, i even check if it lock the form and it's not, if i do it on ... Dim c2 As Control ... Using Windows XP pro latest patch ...
    (microsoft.public.access.formscoding)
  • Form when populate execute code
    ... the code, i even check if it lock the form and it's not, if i do it on ... Dim c2 As Control ... Using Windows XP pro latest patch ...
    (microsoft.public.access.formscoding)