Option groups to select data from a table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Have come to a crunch - i think i need to use an If...Then...Else but don't know how to implement it

I have data in a table which i would like to group in to (a) Null and Value " Uncomplicated" or (b) All values (inc Null). I think (?) an if/then/else based on an option box would work in the underlying query but i don't know how to go about referencing/syntax/getting the damn thing to work :

Any ideas - there's probably a simple solution but i'm to boneheaded to see it

Chris
 
Chris

You posted in the "forms" newsgroup, so I'll infer that you are trying to do
this in a form.

From your description, I can't tell how you are trying to split
up/categorize your data. And I'm not sure that you are referring to a
single field of data, or more than one...

You described option boxes, If...Then, referencing, query, but I'm not
getting a picture of WHAT you are trying to accomplish.
 
Jef

Sorry - new at the user group thing - will supply you the details

Yes - i am trying to do this in a form based on a query. I am trying to split the data into tow groups ,(a) one containing only null fields or a single string(" Uncomplicated"), (b) the other group being all entries (null and not null). To put it another way, I am either trying to select all the data or just a subgroup. Whilst this group depends on a sinlge field, there will be several fields in the query

Basically what I want to do is have one option in the control referring to (a) and one referring to (b) so that when i run the query it will return either option depending upon the control. The reason for the if/then/else is that IF option (a) is selected THEN return only null fields or " Uncomplicated" ELSE return null and not null. .

Hope this clarifies things

Chris
 
Chris

If I understand better now, it sounds like you need to create/modify a SQL
statement "on-the-fly", based on the setting of an option group. You can
add code to a command button that runs your query (or report), and in that
code, "read" the value of the option group. Set different criteria, based
on the option group value, then run the SQL statement, all from code.
 
Back
Top