S
sg
I have a main form named frm Item PT. It has a subform that shows as a
datasheet. The subform is named Fail. On the main form, when a combo box
shows "Unnacceptable", I want to show the subform related to that record to
enter information about why it is unacceptable. The forms are linked
together using the PT ID field.
Right now I have the following code:
Me.[fail].Visible = (Me.[accept/not accept] = "Not acceptable")
in the after update event
Although it doesn't show the subform like I would like it to (as if I had
clicked on the plus sign to show the subform), it does open the subform so I
can enter a new record. The problem is when the form opens, it does not
inherit the main forms PT ID. When I enter data into the subform that opens,
it will not save the record.
Two questions here:
1. Is there a way to get it to really show the subform in the same window
as the main form (as if I clicked on the plus sign)
2. If I have to open it as a separate form, how do I get it to pull the PT
ID in so I can enter a new record?
Thanks in advance for any help!
datasheet. The subform is named Fail. On the main form, when a combo box
shows "Unnacceptable", I want to show the subform related to that record to
enter information about why it is unacceptable. The forms are linked
together using the PT ID field.
Right now I have the following code:
Me.[fail].Visible = (Me.[accept/not accept] = "Not acceptable")
in the after update event
Although it doesn't show the subform like I would like it to (as if I had
clicked on the plus sign to show the subform), it does open the subform so I
can enter a new record. The problem is when the form opens, it does not
inherit the main forms PT ID. When I enter data into the subform that opens,
it will not save the record.
Two questions here:
1. Is there a way to get it to really show the subform in the same window
as the main form (as if I clicked on the plus sign)
2. If I have to open it as a separate form, how do I get it to pull the PT
ID in so I can enter a new record?
Thanks in advance for any help!