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
|
|||
|
|||
Locking certain records in a table
Is there a way to lock certain records within a table? For example, if I
wanted to lock records entered prior to September 19, 2008, is there a way to do that? Also, is there a way to force users out of a database? If I need to make design changes and someone is idly in the database, can I force that user out? -- Annetta |
#2
|
|||
|
|||
Locking certain records in a table
The answer to your locking question depends on what you mean by "lock".
Prevent these records from being displayed? Or show them but prevent changes to them? -- TedMi "Annetta" wrote: Is there a way to lock certain records within a table? For example, if I wanted to lock records entered prior to September 19, 2008, is there a way to do that? Also, is there a way to force users out of a database? If I need to make design changes and someone is idly in the database, can I force that user out? -- Annetta |
#3
|
|||
|
|||
Locking certain records in a table
Yes, I'd like them to be displayed but prevent changes from being made to
them. Is there a way to do this? -- Annetta "tedmi" wrote: The answer to your locking question depends on what you mean by "lock". Prevent these records from being displayed? Or show them but prevent changes to them? -- TedMi "Annetta" wrote: Is there a way to lock certain records within a table? For example, if I wanted to lock records entered prior to September 19, 2008, is there a way to do that? Also, is there a way to force users out of a database? If I need to make design changes and someone is idly in the database, can I force that user out? -- Annetta |
#4
|
|||
|
|||
Locking certain records in a table
Access does not support record-level locking at least in the way that you
mean. Some other databases do. You might be able to do so by implementing user-level security and some complex queries or forms. Often the best way around this problem is to train then trust your users. Also back up nightly! If the database is split, you should be able to make changes to the front end (FE) in a development environment (complete with its own back end (BE) of test table data) then give the users the new copy of the FE. Making changes to the production BE can be a little more difficult. I often do such work on evenings and weekends when the users aren't around. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Annetta" wrote: Yes, I'd like them to be displayed but prevent changes from being made to them. Is there a way to do this? -- Annetta "tedmi" wrote: The answer to your locking question depends on what you mean by "lock". Prevent these records from being displayed? Or show them but prevent changes to them? -- TedMi "Annetta" wrote: Is there a way to lock certain records within a table? For example, if I wanted to lock records entered prior to September 19, 2008, is there a way to do that? Also, is there a way to force users out of a database? If I need to make design changes and someone is idly in the database, can I force that user out? -- Annetta |
#5
|
|||
|
|||
Locking certain records in a table
On Thu, 18 Sep 2008 10:42:02 -0700, Jerry Whittle
wrote: Access does not support record-level locking at least in the way that you mean. Some other databases do. You might be able to do so by implementing user-level security and some complex queries or forms. Often the best way around this problem is to train then trust your users. Also back up nightly! As Jerry says, Access doesn't support this at the database level. It would be tricky with any database, actually. But if your users are just using Access forms, and you trust them not to try to get to the database directly, you can use a ClosedFlag field or a LockAsOfDate field to programmatically determine whether a record should be editable when it is shown on in a form. If it isn't, you can loop through all the controls in the form's control collection and set them to Locked=True. You can also set the background color of the controls to a non-editable color like the Windows background color (e.g. gray). This assumes that you are using a form in single view - this won't work with multiple records on a continuous form. Armen Stein Microsoft Access MVP www.JStreetTech.com |
Thread Tools | |
Display Modes | |
|
|