Link to home
Start Free TrialLog in
Avatar of ChuckRush
ChuckRush

asked on

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") & " )"
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

<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...
Avatar of ChuckRush
ChuckRush

ASKER

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.
if there was a way to allow for more than 3 linked fiedls that would be perfect
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You gave me the hint i needed. I simply added the link fields manually and everything works great. Thanks
ummm, ...ok

;-)

Jeff