Check box

  • Thread starter EMILYTAN via AccessMonster.com
  • Start date
E

EMILYTAN via AccessMonster.com

I have this check box...then I only want them to insert data when the check
box is being checked and not just click.

May I know how to code the line?
 
S

Scott.Ashby

I have this check box...then I only want them to insert data when the check
box is being checked and not just click.

May I know how to code the line?

Emily,

I think if you do a conditional check of value of the check box in the
_Click event procedure, you can trap it:

Private Sub Check50_Click()

If Check50.Value = -1 Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70
End If

End Sub

or something like that.

Scott
 
B

banem2

Emily,

I think if you do a conditional check of value of the check box in the
_Click event procedure, you can trap it:

Private Sub Check50_Click()

If Check50.Value = -1 Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70
End If

End Sub

or something like that.

Scott

Or:

If Me.Dirty and Check50 = True Then
'Save record
Else
MsgBox "Cannot Save"
'Optionally: Me.Undo
End if

Regards,
Branislav Mihaljev
 
Top