Record Lock Status & Exist Query

icezebra

Registered User.
Local time
Today, 12:55
Joined
Feb 12, 2007
Messages
22
Afternoon.

I have had a search through the forum however am unable to find anything...

I have two questions:

a) How do I check whether someone else is currently accessing a record / form?


i.e. Opening the form (SchemeDetails) like this:

DoCmd.OpenForm "SchemeDetails", acNormal, "", "", acEdit, acNormal
Forms!SchemeDetails.SetFocus
DoCmd.GoToRecord acForm, "SchemeDetails", acGoTo, tempVal
Can I check if someone else is in the specified record before I open it? Record Locking is (deliberately) set to "No Locks".

b) How do I check to see if a table exists?

i.e. If DataTable2.Exists = True then ...
Or something like this?​


Hope someone can help me!
 
Ok, I've solved question b myself, however question a is still troubling me...

Is there anyway at all of checking the lock status of a record? Help!
 
Access does not support true record locking only page locking. There are lock table viewers available although you will not be able to tell which record a user is editing. In the normal scheme of things Access will take care of locking for you even if you specify no locks in a multi user environment Access will use optimistic locking. Other wise you will have to implement your own locking recording scheme in a Session Lock file.
 
Ah well. Thanks for your help anyway! Managed to fudge my way around it by updating a field on entry into the form, but checking the status of this field before doing this and going in for editing...

Another question... If I run a query from vb and have the results pop up in a window. Is there anyway of linking from there to a form. I.e. clicking on record 3 will open record 3 in the specified form?
 
Icezebra

either create a form with the query as a record source . the form should be a continious form. Place a button on the detail line and when clicked open up the target form with the criteria set to the ID of the selected Row.

Or and this is easier

on the target form, use the wizard to create a combo box, using your query as the record source and specify that you want to find a record in the wizard.
 
Ah well. Thanks for your help anyway! Managed to fudge my way around it by updating a field on entry into the form, but checking the status of this field before doing this and going in for editing...
QUOTE]


I have the same problem and the same solution by changing a field value on entry in the "current" piece of code.
But if the serch returnes a number of records and then you flip through them how can you set the field to blank or null on exit from the record, not by closing the form that works but buy just moving to the next record ?
 

Users who are viewing this thread

Back
Top Bottom