hardhitter06
Registered User.
- Local time
- Today, 01:06
- Joined
- Dec 21, 2006
- Messages
- 600
Hi All,
I'm trying to figure out how to require an OLE Object in the BeforeUpdate of my Access 2010 input form.
The ole object is named ExecutedContract.
I'm not sure how to integrate this piece of code with what I have so far. I'm also having trouble finding anything on the web.
Thank you
I'm trying to figure out how to require an OLE Object in the BeforeUpdate of my Access 2010 input form.
The ole object is named ExecutedContract.
I'm not sure how to integrate this piece of code with what I have so far. I'm also having trouble finding anything on the web.
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim ctrl As Control
For Each ctrl In Me.Controls
If ctrl.Tag <> "skip" Then
If ctrl.ControlType = acTextBox Then
If IsNull(ctrl) Then
MsgBox ctrl.Name & " Cannot Be Left Empty!"
Cancel = True
ctrl.SetFocus
Exit Sub
End If
End If
End If
Next
MsgBox "Record Saved!"
End Sub
Thank you