Record Locked Status

Gary_Mc_Mahon

Board Regular
Joined
Apr 30, 2003
Messages
87
Hi,

I have created on open and on close events in my main form to edit lock the records on open and remove the locks when the form is closed. The reason for this is that when toggling between screens I had problems when I leave the edit record locks on permanently.

What I'd like to do is display a message on the form screen when the record is actually locked.

Any tips with the syntax. Is current event the right one??

Private Sub Form_Current()

If 'record is locked' then
Msgbox("Record is locked for editing")
Else
End If

End Sub

Cheers
Gary
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Gary,
You could try opening the record and monitoring for the error that occurs because the record is locked. Don't know if this will help you or not.
 
Upvote 0
As you are all ready running code you could just create a label on the form giving the warning and turn its visibility on and off at the same time as you change the locks.

Peter
 
Upvote 0

Forum statistics

Threads
1,221,813
Messages
6,162,117
Members
451,743
Latest member
matt3388

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top