Trouble with code when record is locked

ShaneMan

Registered User.
Local time
Today, 02:04
Joined
May 9, 2005
Messages
1,224
I'm going live with my DB tomorrow morning. I wanted to to Edited Records for my lock type but ran into a problem, this weekend when I took it to our office and had it on multiple computers for the first time. (I've been designing at my house, in my spare time (right), so I couldn't test for the problem I have now.) When a user is on a record and I open the same record up on another computer it locks ok and shows in the Record Selector that it's locked but if I begin to tab through the form I have at least one code that pukes. In my LastName field, in the On Exit event, I have the following code:
If Not (IsNull(Me.LastName)) Then
Me.LastName = StrConv(Me.LastName, vbProperCase)
End If
As I try to Exit this field, only when the record is locked, the code pukes. Can some one lend a hand and give some advise on how to prevent this?

Thanks ahead of time,
Shane
 
Shane,

You shouldn't use the OnExit event to run that code. Change it to the
BeforeUpdate or AfterUpdate event of LastName.

Wayne
 
Wayne,

Thanks for the help. I'll give it a try.

Shane
 

Users who are viewing this thread

Back
Top Bottom