Yes/No, Option Group

S

SillySally

Hi. I'm a little confused. I want to give users 3
choices: Member, Affiliate, or (the ever popular!) Both.

Members can't be Affiliates, but Affiliates can be
Members. This is new. Originally I had 2 choices:
Member or Affiliate. Each set up as Yes/No (you've
already yelled at me)- so 2 fields, 2 options.

Now I need to do it correctly ;-) Do I set up 3
different fields in the table? Do I have one field (Flag)
and use an option group bound to it, and when I use code
I'd say if Flag = 3 then... Details much appreciated.

Thanks!
 
F

fredg

Hi. I'm a little confused. I want to give users 3
choices: Member, Affiliate, or (the ever popular!) Both.

Members can't be Affiliates, but Affiliates can be
Members. This is new. Originally I had 2 choices:
Member or Affiliate. Each set up as Yes/No (you've
already yelled at me)- so 2 fields, 2 options.

Now I need to do it correctly ;-) Do I set up 3
different fields in the table? Do I have one field (Flag)
and use an option group bound to it, and when I use code
I'd say if Flag = 3 then... Details much appreciated.

Thanks!

Add an Option Group to your form bound to a (Number Datatype, Integer
field size) field in your table.
Add 3 radio buttons.
Button values are 1, 2, and 3.
Which ever button is selected, the corresponding number value is
written to the table.

You can convert the number value to a text value, in a report, for
example, by using an unbound control:

=Choose([OptionGroupName],"Member","Affiliate","Both")
 
S

SillySally

Thanks. It seems my last post disappeared. I did figure
this out, thanks to you. I have option group:
MemberOptionGroup with 3 option buttons: MemberOpt,
RegisteredOpt and BothOpt. The field in the table is
MemberOption so I'm using that for coding: If
MemberOption = 1 Then... It seems right.

But I am having difficulties with a count query. I'm
trying to count the number of people with MemberOption =2
+ MemberOption=3. But it's not going well. I don't get
one count value. Any suggestions? Doing it right is
hard (but I suppose will be easier in the long run!).
Thanks- I appreciate your help.
-----Original Message-----
Hi. I'm a little confused. I want to give users 3
choices: Member, Affiliate, or (the ever popular!) Both.

Members can't be Affiliates, but Affiliates can be
Members. This is new. Originally I had 2 choices:
Member or Affiliate. Each set up as Yes/No (you've
already yelled at me)- so 2 fields, 2 options.

Now I need to do it correctly ;-) Do I set up 3
different fields in the table? Do I have one field (Flag)
and use an option group bound to it, and when I use code
I'd say if Flag = 3 then... Details much appreciated.

Thanks!

Add an Option Group to your form bound to a (Number Datatype, Integer
field size) field in your table.
Add 3 radio buttons.
Button values are 1, 2, and 3.
Which ever button is selected, the corresponding number value is
written to the table.

You can convert the number value to a text value, in a report, for
example, by using an unbound control:

=Choose([OptionGroupName],"Member","Affiliate","Both")


--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
F

fredg

Thanks. It seems my last post disappeared. I did figure
this out, thanks to you. I have option group:
MemberOptionGroup with 3 option buttons: MemberOpt,
RegisteredOpt and BothOpt. The field in the table is
MemberOption so I'm using that for coding: If
MemberOption = 1 Then... It seems right.

But I am having difficulties with a count query. I'm
trying to count the number of people with MemberOption =2
+ MemberOption=3. But it's not going well. I don't get
one count value. Any suggestions? Doing it right is
hard (but I suppose will be easier in the long run!).
Thanks- I appreciate your help.
-----Original Message-----
Hi. I'm a little confused. I want to give users 3
choices: Member, Affiliate, or (the ever popular!) Both.

Members can't be Affiliates, but Affiliates can be
Members. This is new. Originally I had 2 choices:
Member or Affiliate. Each set up as Yes/No (you've
already yelled at me)- so 2 fields, 2 options.

Now I need to do it correctly ;-) Do I set up 3
different fields in the table? Do I have one field (Flag)
and use an option group bound to it, and when I use code
I'd say if Flag = 3 then... Details much appreciated.

Thanks!

Add an Option Group to your form bound to a (Number Datatype, Integer
field size) field in your table.
Add 3 radio buttons.
Button values are 1, 2, and 3.
Which ever button is selected, the corresponding number value is
written to the table.

You can convert the number value to a text value, in a report, for
example, by using an unbound control:

=Choose([OptionGroupName],"Member","Affiliate","Both")


--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

In a query?
What have you done so far?

Here are 2 ways.
You store the values (1,2, or 3) in the [MemberOption] field.
To count the members with the value of, let's say 2, you could use:

CountRegistered:Sum(IIf([MemberOption]=2,1,0)

or..
DCount("*","TableName","[MemberOption] = 2")

Change the criteria to 3 for the [BothOpt] option.

If you wish the combined totals of 2's and 3's, then:
Combined:Sum(IIf([MemberOption]=2 or [MemberOption]=3,1,0)
or..
DCount("*","TableName","[MemberOption] = 2 or [MemberOption] = 3")
 
S

SillySally

Sorry- my bad. I'm using a form with a record source-

Thanks for giving me so many options. I used
Sum(IIf([MemberOption]=2 or [MemberOption]=3,1,0)

And it worked just right. Thanks for the help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top