A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

lock records code



 
 
Thread Tools Display Modes
  #1  
Old November 1st, 2005, 06:00 PM
Steel via AccessMonster.com
external usenet poster
 
Posts: n/a
Default lock records code

Hi,

I am currently working on code to lock specific records in a form and came
across a post with the following code that appears to do what I need. This
may be a very simple question but what does bLock refer to in this code?
Also, I interpret the first part of the code as: For the current form when
Year = 2004 then lock all records but what exactly does the second part of
the code do?

Private Sub Form_Current()
Dim bLock As Boolean
If Me.[Year] = 2004 Then
bLock = True
End If
If Me.AllowEdits = bLock Then
Me.AllowEdits = not bLock
Me.AllowDeletions = not bLock
End If
End Sub

Thanks.

Steel
  #2  
Old November 2nd, 2005, 08:19 AM
external usenet poster
 
Posts: n/a
Default lock records code


Steel via AccessMonster.com wrote:
I am currently working on code to lock specific records in a form and came
across a post with the following code that appears to do what I need.


For an alternative (and IMO better) approach, take a look at this
thread:

http://groups.google.com/group/micro...0b1515e6bd9725

  #3  
Old November 2nd, 2005, 07:21 PM
Steel via AccessMonster.com
external usenet poster
 
Posts: n/a
Default lock records code

Thanks for the suggestion. I will give this a try.



wrote:
I am currently working on code to lock specific records in a form and came
across a post with the following code that appears to do what I need.


For an alternative (and IMO better) approach, take a look at this
thread:

http://groups.google.com/group/micro...0b1515e6bd9725


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200511/1
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with code for RecordSet.AddNew [email protected] Using Forms 5 August 11th, 2005 11:17 PM
Make Change Case in Excel a format rather than formula Kevin Worksheet Functions 1 March 18th, 2005 08:53 PM
0x80040109 error when sending from SSL SMTP krouse General Discussion 7 March 15th, 2005 01:55 AM
Export to RTF very slow when code is present in Access report. [email protected] Setting Up & Running Reports 11 September 14th, 2004 08:17 PM
New records can't be seen rleblanc Using Forms 6 August 14th, 2004 02:43 PM


All times are GMT +1. The time now is 08:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.