Combobox RowSource derived from 2 option groups

batwings

Registered User.
Local time
Today, 21:21
Joined
Nov 4, 2007
Messages
40
Hi there

I am trying to use 2 option groups both having 3 radio buttons to filter the rowsource of a combobox,

I was thinking of using 2 sets of Case Statements but do any of you know if this would work or is ther another way?

It is a case of the user can select one button from either group, one selection in both groups would be the default. Default from one option group and default from the other option group would show all records.

Difficult to explain hope you understand what I mean

Data is all derived from one table.

Thanks

B:rolleyes:
 
you can nest cases

i use this, as an example

one option group offers a choice of dates

current day only
current week

and the other offers choice of report

print
preview
just show query

and then a "do it" button
-----------
its a bit repetitive nesting the cases statements, but it works fine
 
UncleGizmo

Yes you have it correct only thing is I am trying to filter from 2 different fields within the same table, is it just a case of writing an SQL query for each Select Case Statement to cover every option?

like below but all the different scenarios?


Code:
SELECT mytable.[field1], mytable.[field2], 
mytable.[field3] FROM mytable

Code:
SELECT mytable.[field1], mytable.[field2], 
mytable.[field3] FROM mytable WHERE (((mytable.[field2])="Apples") 
AND ((mytable.[field3]) Is Not Null));

Code:
SELECT mytable.[field1], mytable.[field2], 
mytable.[field3] FROM mytable WHERE (((mytable.[field2])="Oranges") 
AND ((mytable.[field3]) Is Null));



how do I then output this to a report?

Thanks for getting back to me so quickly

B:)
 
Gemma

That sounds like another good way but my VBA skills are pretty limited, do you have an example of nested cases or a URL where I might find some examples?

Thanks to you to for responding so quickly

B:)
 

Users who are viewing this thread

Back
Top Bottom