How to store data using checboxes in database using databinding or in other ways

master_2013

Active member
Joined
Jul 8, 2013
Messages
41
Programming Experience
Beginner
i just want to store check box data along with the name from my Admission Table and i have created another table name "health" to store checked data here can anyone help me on this to solve my problem and if a new admission these form popup automatically after i save all the details in admission form and after that i fill up this health questionnaire form

here i attached the screenshot of health questionnaire form and Admission Form
 

Attachments

  • addm.jpg
    addm.jpg
    108.6 KB · Views: 42
  • health.jpg
    health.jpg
    112.4 KB · Views: 45
First of all, you should not be using two CheckBoxes per question on that second form. You should either be using a single CheckBox per question, where checked means Yes and unchecked means No, or be using two RadioButtons for each question, where each pair is on its own Panel and therefore works as a group. CheckBoxes are intended to work independently so, in theory, the user could check both the Yes and no box for the same question in your form. Where you want the user to make a single choice from multiple, as you do here, you use RadioButtons.
 
It's simple as it is. Replace each pair of CheckBoxes with a Panel containing two RadioButtons. Once you've got them set up, then we can worry about loading and saving data.
 
Then you haven't followed my instructions. Go back and read my posts again. I've told you what to do and why. This is exactly why I wanted to address the issue one step at a time. If you can't get the first step right then nothing that comes after can possibly work.
 
Hi,

Here is a helping hand for you. Re-Read post #4 again and again until you come up with something like the below:-

FormLayout.jpg

I have added the Panels with a border so that you can see them, but you can get rid of the borders, if you want, by setting the BorderStyle of the Panel's to None.

Hope that helps.

Cheers,

Ian
 
thanks for valuable example i will do that. please help me on coding these form i already created a table in my access database as HEALTH but im am not able to understand how to create fields which stores these selected radio button data please help me on this also thanks again for your help sir
 
Hi,

Sorry, but I only jumped in to give a steer since you seemed to be missing the obvious.

When it comes to saving your information and using the Radio Buttons you need to show us what you have tried, since we are not just going to do it for you. If you are then still struggling I am sure that jmcilhinney will jump in again to continue his tuition.

Cheers,

Ian
 
Back
Top