spartansFC
Programmer
Hi
This tiny little problem which is probably so easy to solve is getting on my nerves.
I have a form which is made up of 2 other subforms:
frmParentChildReviewDates
frmParentChildReviewDatesSubform
frmParentChildReviewDatesSubformInformation
What i'm trying to do is stop the user from entering data on the frmParentChildReviewDatesSubformInformation before they enter anything on the frmParentChildReviewDatesSubform. I want it to go back to dteReviewDate which is a textbox on frmParentChildReviewDatesSubform.
So on the before update event on the lngRevuewDateInformation textbox on frmParentChildReviewDatesSubformInformation, i have the following code:
You can see how many different variations i've tried. It gets so far, the Msgbox message does appear so the IfNull statement is working, but then why i try to set focus back to the first subform, it just won't do it.
Someone put me out of my misery
Mikie
This tiny little problem which is probably so easy to solve is getting on my nerves.
I have a form which is made up of 2 other subforms:
frmParentChildReviewDates
frmParentChildReviewDatesSubform
frmParentChildReviewDatesSubformInformation
What i'm trying to do is stop the user from entering data on the frmParentChildReviewDatesSubformInformation before they enter anything on the frmParentChildReviewDatesSubform. I want it to go back to dteReviewDate which is a textbox on frmParentChildReviewDatesSubform.
So on the before update event on the lngRevuewDateInformation textbox on frmParentChildReviewDatesSubformInformation, i have the following code:
Code:
Private Sub lngRevuewDateInformation_BeforeUpdate(Cancel As Integer)
If IsNull(Forms!frmParentChildReviewDates![frmParentChildReviewDatesSubform].Form![dteReviewDate]) Then
MsgBox "You must enter a Review Date, please go back and enter date to continue"
'DoCmd.GoToControl "forms!frmParentChildReviewDates![frmParentChildReviewDatesSubform].[dteReviewDate]"
'DoCmd.GoToControl "[frmParentChildReviewDatesSubform]![dteReviewDate]"
'frmParentChildReviewDatesSubform.SetFocus
'Me.frmParentChildReviewDatesSubform.SetFocus
'Forms!frmParentChildReviewDates![frmParentChildReviewDatesSubform].SetFocus
'frmParentChildReviewDatesSubform.Form.dteReviewDate.SetFocus
Me!frmParentChildReviewDates!frmParentChildReviewDatesSubform.SetFocus
Me!dteReview.SetFocus
End If
End Sub
You can see how many different variations i've tried. It gets so far, the Msgbox message does appear so the IfNull statement is working, but then why i try to set focus back to the first subform, it just won't do it.
Someone put me out of my misery
Mikie