Click here to Skip to main content
15,890,282 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How do I make a button to save combobox theme? Pin
Richard MacCutchan10-Dec-16 20:50
mveRichard MacCutchan10-Dec-16 20:50 
QuestionLoading a combobox from the selection of a previous combobox in visual basic Pin
CharlesGuru8-Dec-16 22:41
CharlesGuru8-Dec-16 22:41 
AnswerRe: Loading a combobox from the selection of a previous combobox in visual basic Pin
Richard MacCutchan8-Dec-16 23:01
mveRichard MacCutchan8-Dec-16 23:01 
QuestionDownload Web page (aspx) with content / Webclient? Pin
SHCruz8-Dec-16 16:26
SHCruz8-Dec-16 16:26 
QuestionSelect columns access database Pin
Member 128225738-Dec-16 0:08
Member 128225738-Dec-16 0:08 
AnswerRe: Select columns access database Pin
Richard MacCutchan8-Dec-16 1:24
mveRichard MacCutchan8-Dec-16 1:24 
GeneralRe: Select columns access database Pin
Member 128225738-Dec-16 3:36
Member 128225738-Dec-16 3:36 
GeneralRe: Select columns access database Pin
Richard MacCutchan8-Dec-16 3:52
mveRichard MacCutchan8-Dec-16 3:52 
Because you are selecting items from each column one at a time instead of all together. You should first build your SELECT statement with the column names from all the selected items in the listbox. You can then make one database call which will read all the items from the selected records. Something like:
VB
Dim cols as StringBuilder
For Each Item As Object In lbxSelectItems.Items
    cols.Append(Item.ToString + ", ")
Next
Dim rep = cols.Length
cols.Remove(rep-2, 2)

da = New OleDbDataAdapter("Select " & cols.ToString & "  from " & selectTable, con)
da.Fill(dt)
I apologise for any syntax errors in the above; I am not a VB expert.
GeneralRe: Select columns access database Pin
Member 128225738-Dec-16 6:28
Member 128225738-Dec-16 6:28 
GeneralRe: Select columns access database Pin
Richard MacCutchan8-Dec-16 6:44
mveRichard MacCutchan8-Dec-16 6:44 
QuestionProgressbar feedback (one fill another) Pin
SHCruz5-Dec-16 22:49
SHCruz5-Dec-16 22:49 
QuestionRe: Progressbar feedback (one fill another) Pin
CHill606-Dec-16 5:08
mveCHill606-Dec-16 5:08 
AnswerRe: Progressbar feedback (one fill another) Pin
SHCruz7-Dec-16 11:59
SHCruz7-Dec-16 11:59 
QuestionVB.net - Index was out of range. Must be non-negative and less than the size of the collection Listview Pin
Abung Salman2-Dec-16 16:46
Abung Salman2-Dec-16 16:46 
QuestionRe: VB.net - Index was out of range. Must be non-negative and less than the size of the collection Listview Pin
Richard MacCutchan2-Dec-16 22:04
mveRichard MacCutchan2-Dec-16 22:04 
AnswerDon't post your question in multiple forums Pin
Dave Kreskowiak3-Dec-16 3:26
mveDave Kreskowiak3-Dec-16 3:26 
AnswerRe: VB.net - Index was out of range. Must be non-negative and less than the size of the collection Listview Pin
Richard Deeming5-Dec-16 2:00
mveRichard Deeming5-Dec-16 2:00 
QuestionQuestion about Class Interaction Pin
hilli_micha1-Dec-16 10:32
hilli_micha1-Dec-16 10:32 
AnswerRe: Question about Class Interaction Pin
Richard Deeming1-Dec-16 11:00
mveRichard Deeming1-Dec-16 11:00 
GeneralRe: Question about Class Interaction Pin
hilli_micha1-Dec-16 11:10
hilli_micha1-Dec-16 11:10 
GeneralRe: Question about Class Interaction Pin
Richard Deeming1-Dec-16 11:18
mveRichard Deeming1-Dec-16 11:18 
GeneralRe: Question about Class Interaction Pin
hilli_micha2-Dec-16 18:38
hilli_micha2-Dec-16 18:38 
QuestionConvert VB to C# Pin
Pavlex429-Nov-16 7:00
Pavlex429-Nov-16 7:00 
AnswerRe: Convert VB to C# Pin
Wendelius29-Nov-16 7:25
mentorWendelius29-Nov-16 7:25 
GeneralRe: Convert VB to C# Pin
Pavlex429-Nov-16 8:05
Pavlex429-Nov-16 8:05 

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.