option code

samm

Registered User.
Local time
Today, 10:12
Joined
Sep 19, 2003
Messages
27
HI FOR ALL


NEED OPTION CODE
Three option groubs G1 G2 G3 each groub has three options A B C, and text with option,
all options have value = 1
I want each option selected add with other seletc
I need code for result addition in T1 and text in T2,

textbox ( T1, T2)


Regards;
 
That's not the way option groups work. Each option in a group needs to have a unique numeric value. Each option group returns the value represented by the selected option so if option B is selected, the value returned would normally be 2. When option B is selected, A and C are deseleted.

Given that, your request doesn't make any sense. Sounds more like you have a 1-many relationship and the 9 options should actually be stored as rows in the many-side table when they are selected. So, if 2 items are selected, you would end up with 2 rows in the many-side table.

And finally, storing multiple values in a single field is poor practice and once you try to work with the values, you might understand why.
 
thank you so much Pat Hartman

If you have any way to use 0 value for all options EXCEPT one option =1 in each groub.
 
That's not the way option groups work
- I can't figure out what you are trying to do. Each option group stores a single value so you need three columns in your table to hold a value for each option group. Isn't it important to know WHICH option was chosen from each group?
 
thanks

can i use 0.1 or 0.01 for value as adiffernt value

(three columns in the table to hold a value) I dont understand If you can explain more
 
samm,

An option group is just a way of specifying a choice. Let's say
that you have a database about pizzas. Each pizza has a size,
that's perfect for an option group. The values are:

1 = Small
2 = Medium
3 = Large
4 = Extra Large

A pizza can only have ONE size ... the corresponding number (1-4)
is stored for each record. The size has a range of values, but is
only equal to one of them at a time.

When someone uses the option group on the form, they can choose
only one size. The option group will have a value between 1 and 4
depending on which size is chosen. The "others" are just options
that weren't chosen, they don't really have a value because they
don't apply.

The numbers that you assign (for use by ACCESS - when they are
selected) can be anything. You can even make them all the same,
but that really defeats the purpose and doesn't present anything
useful.

Wayne
 
thank you so much WayneRyan and Pat Hartman

you and Pat Hartman are right "Each option group stores a single value"

My form MULTI-CHOISE QUESTION for students

so I like code to store score in tabel,

when I have three groub like

G1 incloud op1 op2 op3
G2 incloud op1 op2 op3
G3 incloud op1 op2 op3
3text ( T1 T2 T3 )

each option value store in one text

please if you have that code fore store the score

regards
 
Most people wouldn't have that code lying around because they wouldn't need it. Which is not to say that as soon as I finish this, someone won't write the code for you to show how smart they are.

When you have a 1-many relationship 1 thing (you haven't given us a clue what this might be) - many choices, you need to store the many-side data in a separate table. Do some reading on normalization.
 

Users who are viewing this thread

Back
Top Bottom