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") & " )"
ChuckRushAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

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

Perhaps another Expert will be along to help further...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.