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  

Locking certain records in a table



 
 
Thread Tools Display Modes
  #1  
Old September 17th, 2008, 08:06 PM posted to microsoft.public.access.tablesdbdesign
Annetta
external usenet poster
 
Posts: 7
Default 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  
Old September 18th, 2008, 02:46 PM posted to microsoft.public.access.tablesdbdesign
TedMi
external usenet poster
 
Posts: 507
Default 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  
Old September 18th, 2008, 03:08 PM posted to microsoft.public.access.tablesdbdesign
Annetta
external usenet poster
 
Posts: 7
Default 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  
Old September 18th, 2008, 06:42 PM posted to microsoft.public.access.tablesdbdesign
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default 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  
Old September 26th, 2008, 07:25 PM posted to microsoft.public.access.tablesdbdesign
Armen Stein
external usenet poster
 
Posts: 507
Default 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

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


All times are GMT +1. The time now is 03:27 PM.


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