G
Guest
Hi guys,
I have a couple of small bits of code within the 'on open' event of a form.
If a condition is true then the form immediately closes via the 'Cancel =
True' line. However, access then pops up with a message saying that the
"OpenForm action was canceled".... Is there a way of preventing this message
from appearing??
Here's one of the bits of code in case it helps:
If tCount("[TCAID]", "qry_CurrentDespatch", "TCAID = " &
[Forms]![frm_DespatchRun]![txtTCAID]) < 1 Then
MsgBox "You may not run any despatch reports for this request." _
& vbCrLf & vbCrLf & "Only requests that have reached Stages 1
through to 6 may be run.", vbExclamation, "TCA not yet ready"
Cancel = True
End If
Thanks in advance,
Lee
I have a couple of small bits of code within the 'on open' event of a form.
If a condition is true then the form immediately closes via the 'Cancel =
True' line. However, access then pops up with a message saying that the
"OpenForm action was canceled".... Is there a way of preventing this message
from appearing??
Here's one of the bits of code in case it helps:
If tCount("[TCAID]", "qry_CurrentDespatch", "TCAID = " &
[Forms]![frm_DespatchRun]![txtTCAID]) < 1 Then
MsgBox "You may not run any despatch reports for this request." _
& vbCrLf & vbCrLf & "Only requests that have reached Stages 1
through to 6 may be run.", vbExclamation, "TCA not yet ready"
Cancel = True
End If
Thanks in advance,
Lee