J
Jerry Crosby
Situation: Form with a subform. Two command buttons above the subform, set
to change the source object of the subform "on click"
That much works. Now I need to tweak it.
On each of the buttons, I need to add some parameters to the subform it
activates. I want one to only show records whose [ArrivalDate] field is
greater than today. The other button needs to open the same subform, but
have it ready for a new record to be entered (i.e., a blank form).
Here's what I have for the on click event right now that merely sets the
source object:
Me![frmReservationInfo].SourceObject = "frmReservationInfo"
Me![frmReservationInfo].LinkChildFields = "GuestID"
Me![frmReservationInfo].LinkMasterFields = "GuestID"
I suspect I need to add some "WHERE" language, but I don't know how or
where. I know I could put it in the actual subform, but since I'm using the
same subform in both instances, I want to set the parameters at the button
level.
Hope I haven't thoroughly confused you. Can someone help?
Jerry
to change the source object of the subform "on click"
That much works. Now I need to tweak it.
On each of the buttons, I need to add some parameters to the subform it
activates. I want one to only show records whose [ArrivalDate] field is
greater than today. The other button needs to open the same subform, but
have it ready for a new record to be entered (i.e., a blank form).
Here's what I have for the on click event right now that merely sets the
source object:
Me![frmReservationInfo].SourceObject = "frmReservationInfo"
Me![frmReservationInfo].LinkChildFields = "GuestID"
Me![frmReservationInfo].LinkMasterFields = "GuestID"
I suspect I need to add some "WHERE" language, but I don't know how or
where. I know I could put it in the actual subform, but since I'm using the
same subform in both instances, I want to set the parameters at the button
level.
Hope I haven't thoroughly confused you. Can someone help?
Jerry