Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

vb.net - on page load controls populate based on MS SQL 2005 query

Posted on 2010-09-04
3
Medium Priority
?
329 Views
Last Modified: 2013-11-27
Looking for code that poulate checkboxes or radioboxes based on a query from ms sql 2005 query.

Select first_name from address where id = "us"

if the number returns 12 then populate the form with 12 checkboxes or radioboxes...

then a submit button at bottom of form so user can choose howmany firstnames they want to choose for the invite...
0
Comment
Question by:GlobaLevel
  • 2
3 Comments
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33604756
You can add a column in you SQL table with bit datatype.the bit when it is populated in a form (datagridview or details view) it gives a check box.then when you update your selections you automatically gain what you want
0
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33604762
Also you can have multiple selections only with checkboxes.
0
 
LVL 1

Accepted Solution

by:
supersugar earned 2000 total points
ID: 33623719
to generate checkbox dynamically:
For Each record in records
    dim checkbox as new checkbox
    checkbox.text=record("first_name")
   checkbox.potision=xx
   me.controls.add(checkbox)
...
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Loops Section Overview
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question