Linking 2 fields from form to form - DoCmd.OpenForm

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
 
G

Guest

ok nevermind i figured it out:
i just changed the last part to

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top