E
Emma
Could anyone help me with the following code? I have one
form when the user can choose from a list of
organizations and then click a button which executes the
following code. The second form which should be opening
should look for the given organization in
field 'organization 1', 'organization 2' or 'organization
3'. No matter what, I get the results only for the org 1
field... never the others. Can't find my problem. I've
checked spelling and such... any ideas?
Dim stDocName As String
Dim stLinkCriteria As String
Dim stLinkCriteriaPt1 As String
Dim stLinkCriteriaPt2 As String
Dim stLinkCriteriaPt3 As String
stDocName = "Contacts"
stLinkCriteriaPt1 = "[Organization 1]=" & "'" & Me!
[Organization] & "'"
stLinkCriteriaPt2 = "[Organization 2]=" & "'" & Me!
[Organization] & "'"
stLinkCriteriaPt3 = "[Organization 3]=" & "'" & Me!
[Organization] & "'"
stLinkCriteria = stLinkCriteriaPt1 & " OR " &
stLinkCriteriaPt2 & " OR " & stLinkCriteriaPt3
DoCmd.OpenForm stDocName, , , stLinkCriteria
form when the user can choose from a list of
organizations and then click a button which executes the
following code. The second form which should be opening
should look for the given organization in
field 'organization 1', 'organization 2' or 'organization
3'. No matter what, I get the results only for the org 1
field... never the others. Can't find my problem. I've
checked spelling and such... any ideas?
Dim stDocName As String
Dim stLinkCriteria As String
Dim stLinkCriteriaPt1 As String
Dim stLinkCriteriaPt2 As String
Dim stLinkCriteriaPt3 As String
stDocName = "Contacts"
stLinkCriteriaPt1 = "[Organization 1]=" & "'" & Me!
[Organization] & "'"
stLinkCriteriaPt2 = "[Organization 2]=" & "'" & Me!
[Organization] & "'"
stLinkCriteriaPt3 = "[Organization 3]=" & "'" & Me!
[Organization] & "'"
stLinkCriteria = stLinkCriteriaPt1 & " OR " &
stLinkCriteriaPt2 & " OR " & stLinkCriteriaPt3
DoCmd.OpenForm stDocName, , , stLinkCriteria