M
macejsc
I'm at my wit's end here and cannot figure this out. I get a Runtime Error
2450 when I reference the subform one way a error that the object cannot be
referenced that way comes up. Here's my VB code.
****************************************************************************************************************
Private Sub Date_AfterUpdate()
VDATE = 0
[Date].SetFocus
VDATE = [Date].Text
[EXPDate].SetFocus
[EXPDate] = DateAdd("yyyy", 2, VDATE)
Forms![Student Info New Records]![Assisting Instructor Subform].SetFocus
Forms![Student Info New Records]![Assisting Instructor Subform].[Date].
SetFocus
Forms![Student Info New Records]![Assisting Instructor Subform].[Date] =
VDATE
End Sub
******************************************************************************************************************
The part as follows is what is giving me trouble:
Forms![Student Info New Records]![Assisting Instructor Subform].SetFocus
Forms![Student Info New Records]![Assisting Instructor Subform].[Date].
SetFocus
Forms![Student Info New Records]![Assisting Instructor Subform].[Date] =
VDATE
I want to reference the [Date] to where what is entered as [Date] in the
mainform is copied to the [Date] field in the subform. This way when people
enter in the data they don't have to enter it three or four times. (FYI The
EXPDate is the expiration date for a 2 year certification). I know after
reading somethings on here that I have to reference the subfrom through the
main form, but how can I reference one of the data fields within the subform??
I'm totally confused now, and don't really know where to go from there.
2450 when I reference the subform one way a error that the object cannot be
referenced that way comes up. Here's my VB code.
****************************************************************************************************************
Private Sub Date_AfterUpdate()
VDATE = 0
[Date].SetFocus
VDATE = [Date].Text
[EXPDate].SetFocus
[EXPDate] = DateAdd("yyyy", 2, VDATE)
Forms![Student Info New Records]![Assisting Instructor Subform].SetFocus
Forms![Student Info New Records]![Assisting Instructor Subform].[Date].
SetFocus
Forms![Student Info New Records]![Assisting Instructor Subform].[Date] =
VDATE
End Sub
******************************************************************************************************************
The part as follows is what is giving me trouble:
Forms![Student Info New Records]![Assisting Instructor Subform].SetFocus
Forms![Student Info New Records]![Assisting Instructor Subform].[Date].
SetFocus
Forms![Student Info New Records]![Assisting Instructor Subform].[Date] =
VDATE
I want to reference the [Date] to where what is entered as [Date] in the
mainform is copied to the [Date] field in the subform. This way when people
enter in the data they don't have to enter it three or four times. (FYI The
EXPDate is the expiration date for a 2 year certification). I know after
reading somethings on here that I have to reference the subfrom through the
main form, but how can I reference one of the data fields within the subform??
I'm totally confused now, and don't really know where to go from there.