Control the CheckBox in form

vip2442

New member
Local time
Yesterday, 19:33
Joined
Mar 22, 2005
Messages
8
Hi

Here I want to know how can i control the checkBox

when i enter ID in form i got the related feilds too so when i want
to edit the record i wnat to check if the checkBox is TRUE i get
messege that i cant edit this record?

checkBox.JPG
 
Last edited:
Is your form's record source a table, or is it a query, or a query expression stored with the form?
If it's not a table, you may not be able to alter the underlying data, depending on whether it is an "updateable recordset". Non-updateable recordsets include those queries which have "calculated fields" or expressions in them.

Sarge.
 
Hi

Hi

the source is query?

i just want to ckeck it befor update if that check box is True so no update will be? or another Idea!
 
Try This

Chanhe to suit your controls (obviously!!).

Code:
Private Sub OrderClosed_AfterUpdate()
Dim ctlCurrent As Control

If Me.OrderClosed = 0 Then
MsgBox "This Order is now open"

For Each ctlControl In Me.Controls
On Error Resume Next
ctlControl.Locked = False
Next
Else
MsgBox "This Order in now closed"

For Each ctlControl In Me.Controls
On Error Resume Next
ctlControl.Locked = True
Next
Me.OrderClosed.Locked = False
End If
End Sub

Hope that's what you are after.
Phil.
 
maybe you can understand me here

Form.JPG


1- when i type the ID i will get the other data related with that ID.

2- Befor updating the record want to check if "Status" CheckBox is True so i can't update the record and get Messege.
 
Last edited:
Try yes or no instead of true or false
 

Users who are viewing this thread

Back
Top Bottom