Click here to Skip to main content
15,905,781 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Importing XLS file to DataTable Pin
dan!sh 9-Sep-08 9:13
professional dan!sh 9-Sep-08 9:13 
GeneralRe: Importing XLS file to DataTable Pin
Codemonkey859-Sep-08 9:23
Codemonkey859-Sep-08 9:23 
AnswerRe: Importing XLS file to DataTable Pin
DrukenProgrammer9-Sep-08 8:58
DrukenProgrammer9-Sep-08 8:58 
GeneralRe: Importing XLS file to DataTable Pin
Codemonkey859-Sep-08 9:05
Codemonkey859-Sep-08 9:05 
GeneralRe: Importing XLS file to DataTable Pin
DrukenProgrammer9-Sep-08 9:12
DrukenProgrammer9-Sep-08 9:12 
GeneralRe: Importing XLS file to DataTable Pin
Codemonkey859-Sep-08 9:23
Codemonkey859-Sep-08 9:23 
GeneralRe: Importing XLS file to DataTable Pin
DrukenProgrammer9-Sep-08 9:34
DrukenProgrammer9-Sep-08 9:34 
GeneralRe: Importing XLS file to DataTable Pin
Codemonkey859-Sep-08 9:43
Codemonkey859-Sep-08 9:43 
Questionform name as a property of a custom control Pin
Randana9-Sep-08 4:38
Randana9-Sep-08 4:38 
AnswerRe: form name as a property of a custom control Pin
Manas Bhardwaj9-Sep-08 4:40
professionalManas Bhardwaj9-Sep-08 4:40 
GeneralRe: form name as a property of a custom control Pin
Randana9-Sep-08 4:45
Randana9-Sep-08 4:45 
AnswerWhy just the form name? Pin
Gregory Gadow9-Sep-08 8:05
Gregory Gadow9-Sep-08 8:05 
QuestionCreate a Semi Background Transparant Form Pin
pdnet9-Sep-08 3:58
pdnet9-Sep-08 3:58 
AnswerRe: Create a Semi Background Transparant Form Pin
Manas Bhardwaj9-Sep-08 4:13
professionalManas Bhardwaj9-Sep-08 4:13 
GeneralRe: Create a Semi Background Transparant Form Pin
pdnet9-Sep-08 19:15
pdnet9-Sep-08 19:15 
QuestionChecking "previously checked" items in a checkbox Pin
C0ley9-Sep-08 3:32
C0ley9-Sep-08 3:32 
AnswerRe: Checking "previously checked" items in a checkbox Pin
Wendelius9-Sep-08 9:09
mentorWendelius9-Sep-08 9:09 
GeneralRe: Checking "previously checked" items in a checkbox Pin
C0ley9-Sep-08 9:46
C0ley9-Sep-08 9:46 
GeneralRe: Checking "previously checked" items in a checkbox Pin
Wendelius9-Sep-08 10:10
mentorWendelius9-Sep-08 10:10 
Okay, first point (based on documentation, which is a bit confusing after your observations)

CheckedListBox.DataSource Property
Gets or sets the data source for the control. This property is not relevant for this class

Back to your question, instead of MoveNext (which doesn't exist) you could use the indexer of Items property (well actually indexer of the ListBox.ObjectCollection class)

In VB I recall that the syntax is
cboMyTable.Item(counter)

However you could also modify the SQL statement so that you don't loop each item in the listbox, but instead you first get all the records and then match them to items. In this case you would use SQL statement like
SELECT ID, OtherID FROM tblMANYTOMANY WHERE OtherID=65
and then fill a datatable based on that and for each row found in datatable, check the corresponding item in the listbox. Although you mentioned that modifying the query wasn't the first option, this would significantly bring scalability to database operations especially if you plan to upgrade to server side database such as SQL Server

Hope this helps,

Mika
GeneralRe: Checking "previously checked" items in a checkbox Pin
C0ley10-Sep-08 0:05
C0ley10-Sep-08 0:05 
GeneralRe: Checking "previously checked" items in a checkbox Pin
C0ley10-Sep-08 0:14
C0ley10-Sep-08 0:14 
GeneralFIXED - Checking "previously checked" items in a checkbox Pin
C0ley10-Sep-08 2:20
C0ley10-Sep-08 2:20 
GeneralRe: FIXED - Checking "previously checked" items in a checkbox Pin
Wendelius10-Sep-08 8:26
mentorWendelius10-Sep-08 8:26 
QuestionReport with vb-net Pin
zagari9-Sep-08 1:04
zagari9-Sep-08 1:04 
AnswerRe: Report with vb-net Pin
Dave Kreskowiak9-Sep-08 6:55
mveDave Kreskowiak9-Sep-08 6:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.