W
wayne zabel
I currently have a working database with forms and subforms. My problem is
in the coding to enable me to display a subform. The application is for
equipment, which is displayed on form1, and equipment components which are
displayed on a related subform1. I have a need to doubleclick on field in
the subform1 and have subform2 popup and display detailed information
relative to just the item appearing in the field I just doubleclicked.
I have attempted to use a variable from subform1 as a filter for subform2
but can't seem to get the syntax right.
The data in the field I click is text data. My code is as follows:
Private Sub Part_ID_DblClick(Cancel As Integer)
Dim stPartID As String
Set stPartID = Forms![equipment list recipe]![recipe ingriediants
subform]!Form![part id]
DoCmd.OpenForm "parts table subform", acNormal, "", "[part id] = stPartID"
End Sub
All help will be most appreciated.
in the coding to enable me to display a subform. The application is for
equipment, which is displayed on form1, and equipment components which are
displayed on a related subform1. I have a need to doubleclick on field in
the subform1 and have subform2 popup and display detailed information
relative to just the item appearing in the field I just doubleclicked.
I have attempted to use a variable from subform1 as a filter for subform2
but can't seem to get the syntax right.
The data in the field I click is text data. My code is as follows:
Private Sub Part_ID_DblClick(Cancel As Integer)
Dim stPartID As String
Set stPartID = Forms![equipment list recipe]![recipe ingriediants
subform]!Form![part id]
DoCmd.OpenForm "parts table subform", acNormal, "", "[part id] = stPartID"
End Sub
All help will be most appreciated.