|
Subject:
|
DATABASE RELATED QUESTION
|
|
Posted By:
|
dkvaseeta
|
Post Date:
|
1/12/2007 10:23:34 AM
|
HI , I want to store student information in MS-Access dabase. my problem is that how can i display student sex on vb form. mead i have a field in access named st_sex that is logical type. on vb form i want to connect them with option control. my problem is that option control don't have data property so how i can store data which is user input on vb form.
anybody help me.thanx in advance -DK
|
|
Reply By:
|
Loralee
|
Reply Date:
|
1/12/2007 4:44:14 PM
|
DK- Welcome to the Forum.
Are you sure you really want to make that field a boolean (yes/no) value? How about making it text with a length of 1 and allow only "M" and "F". Then if the user DOESN'T choose, they are not assigned by default. Are you attaching to an option button control or a combo box?
|
|
Reply By:
|
dkvaseeta
|
Reply Date:
|
1/13/2007 9:20:02 AM
|
thanx for take interest in my problem. your idea is good that make a charater field length is 1 but Actually i think it not not better way. because i have see some software that use "option control" for boolean data type.so can u tell be more... DK
|
|
Reply By:
|
Loralee
|
Reply Date:
|
1/13/2007 11:17:12 AM
|
DK, Try this: 1) Recommend you then make the gender field a byte. Assign "1" to male and "2" to female. 2) Use the Option Group Wizard. (From the tool box) Make the first value label "male" and the second "female". The value of "Male" should be set to 1 and female to 2. 3) Select no default value from the wizard. Then for the Option Group control, set the Control Source to the Gender field. (with your Option Control selected, select the "data" tab>Control Source.)
This will get you the type of control you want in the interface, and it will help keep your data meaningful. If you treat sex/gender as a boolean (yes/no) datatype you run the risk of someone who does not answer being assigned an incorrect value if they skip the question.
|