How to show "All" on form

  • Thread starter Thread starter Scott A
  • Start date Start date
S

Scott A

I'm reprogramming a continuous form - it previously showed
a list of all service providers. We've now started to
group these as 'Internal' and 'External', so I would like
to give users the ability to select to display only
internal SPs, or external SPs, or show all combined in the
list.

I've been able to do the internal/external thing by adding
an option group to the form, and using the values from the
option group as parameters in the form's query
(1=Internal, 2=external), but I can't figure out how to
show All!

Any suggestions?

Thanks,

Scott A
 
Scott,

Sounds like you need to turn the filter off...

Me.FilterOn = False

HTH

John C
 
Hi,

Select Case intProviders
Case 1
DoCmd.OpenForm "frmName", acNormal, ,
strCriteria
'strCriteria = "fldProvider Like External"

Case 2
DoCmd.OpenForm "frmName", acNormal, ,
strCriteria
'strCriteria = "fldProvider Like Internal"

Case 3 'All or either use Else statement
DoCmd.OpenForm "frmName", acNormal, ,
strCriteria
'strCriteria = "fldProvider Like ""*""

End Select

Hope this is what you meant.
tschüs
 
One method -
Add another button to your option group for 3=All.

Then in the criteria of your query you will need something like

WHERE (Forms!Formname!OptionControl=3 or SomeField =
Forms!FormName!OptionControl)

If you are doing this in the query grid, then put the above minus the "Where"
and the "SomeField =" in one critieria cell under the appropriate field. Access
WILL rearrange this into something a bit more complex, but it should work.
 
Back
Top