hi Kevin,
if the form already has unsaved changes (dirty), perhaps you need to
handle that first?
'~~~~~~~~~~~~
if me.dirty then
'PICK ONE:
'undo changes
me.undo
'OR
'save changes
me.dirty = false
end if
'~~~~~~~~~~~~
-crystal
On 2/15/2019 2:33 AM, Qingqing qingqinga@yahoo.com
[MS_Access_Professionals] wrote:
> Dear All,
>
> I have a button on a form, it is supposed to lock the form. My problem is right after clicking on it. the form still can be edited. Only if I move to a text box and click enter, then the form is locked. How can I get the lock effect right after running the command button? Please Help.Thanks!
>
> My code is here:
>
> Private Sub Command424_Click()
> If Me.Checked=True Then
> Me.AllowEdits =False
> ElseIf Me.Checked=False Then
> Me.AllowEdits =True
> End If
> End Sub
>
>
> Best Regards,
> Kevin
>
>
> ------------------------------------
> Posted by: Qingqing <qingqinga@yahoo.com>
> ------------------------------------
>
>
> ------------------------------------
>
> Yahoo Groups Links
>
>
>
Posted by: crystal 8 <strive4peace2008@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar