G
Guest
I have a form that is based on a table "Order Entry". I included a checkbox
with a conditional control source by creating a query in the form's record
source to include this field (chkOp120) from another table (Process Codes).
On the form I called the checkbox (ckTensileTest). I included the following
code in the form's On Current event:
If Me.chkOp120 = -1 Then
Me.ckTensileTest = Me.chkOp120
Else
Me.ckTensileTest = Me.[Tensile Test]
End If
The purpose is so that this check box will be checked automatically if the
corresponding field in the table Process Codes is checked, but will give the
user the option of checking the box if a tensile test is specifically
requested by the customer. The Process Codes table is related to the Order
Entry table by a field on the form called (ID_Process_Key). If, by chance,
the user leaves this field blank, or deletes the information in it, the above
error results. I know why this is happening, but the user does not, so I'm
trying to trap the error and let the user know that the ID_Process_Key field
cannot be left blank in order to preserve the relationship in the control
source. What event will catch this before the system error message appears?
Am I on the right track with this?
with a conditional control source by creating a query in the form's record
source to include this field (chkOp120) from another table (Process Codes).
On the form I called the checkbox (ckTensileTest). I included the following
code in the form's On Current event:
If Me.chkOp120 = -1 Then
Me.ckTensileTest = Me.chkOp120
Else
Me.ckTensileTest = Me.[Tensile Test]
End If
The purpose is so that this check box will be checked automatically if the
corresponding field in the table Process Codes is checked, but will give the
user the option of checking the box if a tensile test is specifically
requested by the customer. The Process Codes table is related to the Order
Entry table by a field on the form called (ID_Process_Key). If, by chance,
the user leaves this field blank, or deletes the information in it, the above
error results. I know why this is happening, but the user does not, so I'm
trying to trap the error and let the user know that the ID_Process_Key field
cannot be left blank in order to preserve the relationship in the control
source. What event will catch this before the system error message appears?
Am I on the right track with this?