How do I detect if record is locked when entering a form

  • Thread starter Thread starter siotrA alletS
  • Start date Start date
S

siotrA alletS

Guest
Hi,

I require to run a networked Access97 database with up to 15 users.

The nature of the datbase is for users to retrieve a record, modify and
update throught the 5 page forms.

Database works trouble free as a single user. However, when 15 users log on
and click the get next record button, 14 of them get lock errors.

I would have logically inticipated that I could use the following on the On
Load:

If Me!Customer_Name.Locked = True Then
DoCmd.GoToRecord , , acNext
End If

But that was my logic!!! - It falls over nevertheless.

Can anyone with similar database shed any light on how this can be done.

Many thanks in advance

siotrA alletS
 
I posted a similiar request several weeks ago and am still waiting a reply.
It would appear we are both using Access in the same manner, which also appears to be not very common.
As I am not up vb code or anything my help is limited, but I did download something from another board recently, Im still trying to work out how to impliment it .
What I am trying to do is that when an operator goes to open the next record, if that record is open, then goto next record.
Please let me know if the following is helpful, if it is maybe you can help me with implementing it.


(Q) How do I find out from code if a form is open or not?

(A) Pass the form name to the following function. Function will return True if form is open and False if it's not.

'******************** Code Start ************************
Function fIsLoaded(ByVal strFormName As String) As Integer
'Returns a 0 if form is not open or a -1 if Open
If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> 0 Then
If Forms(strFormName).CurrentView <> 0 Then
fIsLoaded = True
End If
End If
End Function
'******************** Code End ************************
 
I'm not really convinced that your problem is VB related. I had a client with exactly the same problem. We did two things: 1) upgraded all their Access versions and the database to 2000, and 2) solicited the assistance of their Novell network support to make sure we reloaded the database to a network folder that had full read-write access for all users. Q.E.D.

Hope this helps.

Tom
 
Solution ?

I believe I have the answer for you,

I think I solved the prob today, at least it works single user, so I am going to try it on the network tomorrow. I have every confidence that it will work,

be back this time tomorrow so if youre interested let me know
 

Users who are viewing this thread

Back
Top Bottom