L
LDMueller
I have two tables, Patents and Related. In the Patents table I have a field
called Matter and it's related to the RelatedMtr field in the Related table.
I created a form for the Patent table named frmPatents with a SubForm going
to the Related table named sfRelated. The subform automatically completes
the Matter field with the matter for the current record. This is what I want
so when I add additional matters to the related table I only have to complete
the RelatedMtr field.
I need to have the equivalent of opening the subform in a new windows. If I
try to use a command button to open the subform sfRelated it doesn't
automatically complete the Matter field with the matter for the current
record. Below is my code.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "sfRelated"
DoCmd.OpenForm stDocName, acNormal, , "RelatedMtr= '" & Me.Matter & "'"
I noticed on the Data tab of the Subformed sfRelated is as follows:
Source Object = sfRelated
Link Child Fields = RelatedMtr
Link Master Fields = Matter
I don't have this type of option using a command button to open the form
sfRelated so I'm thinking I may have to do this with code. Can anyone help
me out.
Thanks!
LDMueller
called Matter and it's related to the RelatedMtr field in the Related table.
I created a form for the Patent table named frmPatents with a SubForm going
to the Related table named sfRelated. The subform automatically completes
the Matter field with the matter for the current record. This is what I want
so when I add additional matters to the related table I only have to complete
the RelatedMtr field.
I need to have the equivalent of opening the subform in a new windows. If I
try to use a command button to open the subform sfRelated it doesn't
automatically complete the Matter field with the matter for the current
record. Below is my code.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "sfRelated"
DoCmd.OpenForm stDocName, acNormal, , "RelatedMtr= '" & Me.Matter & "'"
I noticed on the Data tab of the Subformed sfRelated is as follows:
Source Object = sfRelated
Link Child Fields = RelatedMtr
Link Master Fields = Matter
I don't have this type of option using a command button to open the form
sfRelated so I'm thinking I may have to do this with code. Can anyone help
me out.
Thanks!
LDMueller