Linking 2 fields from form to form - DoCmd.OpenForm

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Im setting up a button on a form so that it opens up another form. The only
problem I am having si trying to figure out how i can link 2 fields on the
first form to the form im opening this is my code, what am i doing wrong with
the docmnd.openform

On Error GoTo Err_TeamMemberInputCommand_Click

Dim stDocName As String
Dim stLinkCriteria As String
Dim stLinkCriteria2 As String

stDocName = "Team Member Input"

stLinkCriteria = "[Week Ending]=" & "#" & Me![DateText] & "#"
stLinkCriteria2 = "[Team Member ID]=" & Me![TeamMemberCombo]

DoCmd.OpenForm stDocName, , , stLinkCriteria & stLinkCriteria2
 
ok nevermind i figured it out:
i just changed the last part to

DoCmd.OpenForm stDocName, , , stLinkCriteria & " and " & stLinkCriteria2
 
Back
Top