There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Software Development
Tag Cloud
audio blue screen boot bsod computer cpu crash dell desktop driver drivers error excel external hard drive firefox freezes freezing hard drive hardware hijackthis internet internet explorer ipod itunes lan laptop malware motherboard mouse network networking outlook 2007 power printer problem ram router screen slow sound trojan upgrade usb virus vista vista 32-bit windows windows xp winxp wireless
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Access Tables with locks on


Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
badnap's Avatar
Junior Member with 5 posts.
 
Join Date: Mar 2005
Experience: Intermediate
13-May-2005, 09:33 AM #1
Access Tables with locks on
I am using a table in a form that based on what is listed in the nomunclature feild I can lock the required feild but not all the required feilds will be locked only the ones I specify. The code I am using is below. Please can you give an advice as to why this code is not working.

Private Sub Required_GotFocus()
If Form!NOMENCLATURE = "12RE59*" Then
Form!Required.Locked = True

End If
End Sub
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,952 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
16-May-2005, 04:06 PM #2
Have you tried using On Current event procedure instead of the Gotfocus?
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,952 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
16-May-2005, 04:15 PM #3
This - Form!Required.Locked = True
should be - Forms("Required").RecordLocks = 1 to lock all records of the underlying table when the form is open.
Or Forms("Required").RecordLocks = 2 to lock only records being edited by other users or on the form.
See Access VBA Help on RecordLocks Property
.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:31 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.