Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform to open a filtered form

Status
Not open for further replies.

DeoM

Programmer
Jul 3, 2004
49
PH
Hi,
I have a WORKORDERform with a PARTsubform. I want to click on a record in the PARTsubform which will open the PARTINFOform but will show only the particular record based on the PartID of the PARTsubform. Here's my code:

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "PARTINFOForm"
strPartID = Forms![WORKORDERform]![PARTsubform]!PartID
stLinkCriteria = "[PartID] = " & strPartID
DoCmd.OpenForm stDocName, , , stLinkCriteria
 
Comme ça...

stDocName = "PARTINFOForm"
strPartID = Forms![WORKORDERform]![PARTsubform].Form!PartID
stLinkCriteria = "[PartID] = " & strPartID

n'est-ce pas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top