• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

Filter on Mulltiple fields

I have a su form that i am trying to filter on multiple fields. The filter is not be accepted. I trynig to set the filer in the 'On Load' event. The syntax i am using is:

Me.Filter = "([Program ID] = " & Me.Parent("ProgramID") & " and " & "[Sub Program ID] = " & Me.Parent("SubProgramID") & " and " & "[LocalProjectID] = " & Me.Parent("LocalProjectID") & " and " _
& "[Env] = '" & Me.Parent("Environment") & "' and " & "[Milestone Record Type] =  " & Me.Parent("RecordType") & "  and " & "[PhaseID] =  " & Me.Parent("PhaseID") & " )"
0
ChuckRush
Asked:
ChuckRush
  • 3
  • 3
1 Solution
 
Jeffrey CoachmanMIS LiasonCommented:
<I trynig to set the filer in the 'On Load' event.>
The Load event of which form?
The main form or the subform?

The Subform will be filtered automatically for the corresponding "Main form" record when it opens so I can't easily see a need for doing this on the Subform's Load event...

So can you first take a step back and explain what you are trying to do and why?
Perhaps there is another alternative...
0
 
ChuckRushAuthor Commented:
the key to the subform is more than the 3 fields allowed in the link. I am building this key on the parent form via list boxes and then display the results from the detail form.
0
 
ChuckRushAuthor Commented:
if there was a way to allow for more than 3 linked fiedls that would be perfect
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Jeffrey CoachmanMIS LiasonCommented:
Then I am confused by your design.

Perhaps another Expert will be along to help further...
0
 
ChuckRushAuthor Commented:
You gave me the hint i needed. I simply added the link fields manually and everything works great. Thanks
0
 
Jeffrey CoachmanMIS LiasonCommented:
ummm, ...ok

;-)

Jeff
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now