How do I unlock a record (1 Viewer)

eforce

Registered User.
Local time
Yesterday, 14:49
Joined
Mar 25, 2002
Messages
44
I've read through many posts that talk about using the "AllowEdits" function but I've tried this function and cannot seem to find a solution.

I have a mainform with a field labled "Duty Position" which is a combo box.

When a specific job position is selected I have a small form which pops up that asks for your name and phone.

When I press "OK", my update SQL code is ran:

DoCmd.RunSQL "UPDATE tblMacomUMTSec " & _
"LEFT JOIN tblUMTMemberInfo " & _
"ON tblMacomUMTSec.MACOM = tblUMTMemberInfo.MACOM " & _
"SET tblUMTMemberInfo.MACOMSECNAME = tblMACOMUMTSec.MACOMSECNAME, tblUMTMemberInfo.MACOMPHONE = tblMACOMUMTSec.MACOMPHONE " & _
"WHERE [Forms]![UMT Data Form]![DUTY POSITION] = 'MACOM UMT SECRETARY';"

'My pop-up form closes.'

My mainform is set to "lock edited records" (that's how I want it)
But, I would like this particular situation to take place:

I feel in the pop-up form, close it, the mainform (current record only) is temporarily set to "No locks" to receive the update my RunSQL statement administers.

Is this possible without the use of supercode?

Thanks!

Eforce
 

bjackson

Registered User.
Local time
Today, 10:49
Joined
Jan 3, 2003
Messages
404
in the close event on your pop up
forms![your main form name].allowedits=true
forms![your main form name].cycle=1


if you only want the user to edit certain fields then
you could also lock each field

forms![your main form name]![the name of the control you want locked].locked=true
 

Users who are viewing this thread

Top Bottom