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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 |
Thread Tools | |
Display Modes | |
|
|
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 |