Attached is Sample DB1 of how I set this up and what the problem is.
Below shows the sample db screen shots. Note the Contract Number 75H33333333, and the Record Source for the SF_Contract is TJ_ProjectContract.
I want them to be able to delete the whole record, i.e. ProjContID 4 in the TJ_ProjectContract but I don't want them to be able to delete just the ContractID in SF_Contract. The row source for combo box is Q_ContractCombchooose.
Right now, you can click in the cboContractNumber and delete it. This does not delete the entire record but only the ContractID 3.
This shows the deleting of the ContractID 3 but not the entire record.
With this set up, I'm want the ability to delete the entire record in TJ_ProjectContract but not let the user simply delete the ContractID.
I was thinking of something like below but I'm falling short.
Private Sub cboContractNumber_Exit(Cancel As Integer)
Dim myMsg As Integer
If Nz(Me.cboContractNumber.Text, "") = "" Then
myMsg = MsgBox("You cannot have a BLANK field", vbOKCancel)
Cancel = True
Me.cboContractNumber.Requery
If myMsg = 1 Then
Cancel = -1
Else
Me.cboContractNumber.SetFocus
End If
End If
End Sub