Re: lock record code
- From: "Douglas J Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx>
- Date: Tue, 1 Nov 2005 14:23:47 -0500
bLock is a local variable to the routine. It isn't stored anywhere (nor is
it accessible from code in any other part of the database)
In actual fact, it isn't critical to the routine. It could just as easily
have been written as:
Private Sub Form_Current()
If Me.[Year] = 2004 Then
Me.AllowEdits = False
Me.AllowDeletions = False
Me.AllowAdditions = False
Else
Me.AllowEdits = True
Me.AllowDeletions = True
Me.AllowAdditions = True
End If
End Sub
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Steel via AccessMonster.com" <u15374@uwe> wrote in message
news:56b919aa6609c@xxxxxx
> Is the variable bLock created in the process and, if so, where would this
> variable be stored?
>
> Thanks for the reply.
>
> Steel
>
> Douglas J Steele wrote:
> >Actually, all the first part
> >
> > If Me.[Year] = 2004 Then
> > bLock = True
> > End If
> >
> >does is set a variable to True if the year is 2004: it doesn't lock the
> >records.
> >
> >It's actually the second part that determines whether or not it's
supposed
> >to lock the records (by checking whether bLock is True), and then setting
> >the form's AllowEdits and AllowDeletions properties to False. (In actual
> >fact, you might also want to add Me.AllowAdditions = not bLock, so that
> >users cannot add new records to the database)
> >
> >> Hi,
> >>
> >[quoted text clipped - 19 lines]
> >>
> >> Steel
.
- References:
- lock record code
- From: Steel via AccessMonster.com
- Re: lock record code
- From: Douglas J Steele
- lock record code
- Prev by Date: Re: Running Sum in a form?
- Next by Date: Re: Looks like a crash while processing
- Previous by thread: Re: lock record code
- Next by thread: RE: Requery on command button not working
- Index(es):
Relevant Pages
|