JJFernandez
Registered User.
- Local time
- Yesterday, 22:13
- Joined
- Oct 29, 2018
- Messages
- 18
Hi all,
I am trying, and failing, to think of a good way of ensuring that an entry is made into a subform before the user is allowed to move to another record, create a new record, or save the existing record.
I've tried simply adding some code to the on click event of a Save/Refresh Control Button on the Main Form but keep getting an 'object required' error on the If/Then Line
Private Sub Command63_Click()
If Me.SubformName.Form.TextBox.Value Is Null Then
MsgBox "Subform Value Must Be Entered"
Else
Me.Form.Refresh
End If
End Sub
I've also read that I might want to use a Dcount to test if there is a value in the subform tied to the current main form entry but I just don't know how I would write it.
Thanks for any assistance.
I am trying, and failing, to think of a good way of ensuring that an entry is made into a subform before the user is allowed to move to another record, create a new record, or save the existing record.
I've tried simply adding some code to the on click event of a Save/Refresh Control Button on the Main Form but keep getting an 'object required' error on the If/Then Line
Private Sub Command63_Click()
If Me.SubformName.Form.TextBox.Value Is Null Then
MsgBox "Subform Value Must Be Entered"
Else
Me.Form.Refresh
End If
End Sub
I've also read that I might want to use a Dcount to test if there is a value in the subform tied to the current main form entry but I just don't know how I would write it.
Thanks for any assistance.