Hello everyone. I have a parameter query that I would like to retain the parameter value for future use. What I would like to do is have the user perform the query, select the distinct result that they are looking for. Once they have finished with this particular record, I would like to reopen the query by using a command button but not require the user to reenter their original parameter. I have tried the code below but am not sure if this would work:
[TeamLeader] is the parameter and [ProjectCode] is the primary key that links multiple tables.
Thanks!
Code:
Dim stLinkOne As String
Dim stLinkTwo As String
Dim stLinkThree As String
Dim stDocName As String
stDocName = "frmEntryView"
stLinkOne = "[ProjectCode]=" & Me.sfrmTmLdrSort.Form.ProjectCode
stLinkTwo = "[TeamLeader]='" & Me.sfrmTmLdrSort.Form.Team_Leader & "'"
stLinkThree = stLinkOne & " AND " & stLinkTwo
DoCmd.OpenForm stDocName, , , stLinkThree
Thanks!
Comment