Okay, here's the situation: I am using ADODC and Access 2000, and I need a certain field to be required only when a boolean value is true. I can't change the attributes of the table on the fly because it is a multi-user program. I have tried things such as
and I have tried putting similar code in the other events. All has been to no avail because everything gives me an error somewhere.Code:Private Sub Adodc1_WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset) If Me.Visible = False Or MyBoolean = False Then Exit Sub If adReason = adRsnUpdate And dbcGroup = "" Then MsgBox "Must enter a group." dbcGroup.SetFocus adStatus = adStatusCancel End If End Sub
Help?




Reply With Quote