•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 456,195 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,943 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 1820 | Replies: 2
![]() |
•
•
Join Date: Oct 2006
Posts: 14
Reputation:
Rep Power: 3
Solved Threads: 0
Hi
i have a form where i have 2 comboboxes and a couple of textboxes.
I have set the datasource property to the table and fields as required for all the textboxes and the combobox
The first combobox (cbCriteria) contains the column names of the table and the second combobox (cbSearchCust) contains the data in the fields which are shown according to the criteria selected from the previous combobox (Cust_id, Cust_name or Cust_sname)
I want to connect the cbSearchCust to the textboxes so that when i change the customer from the textbox, the textboxes change. How can i do this?
Thanks
Luke
i have a form where i have 2 comboboxes and a couple of textboxes.
I have set the datasource property to the table and fields as required for all the textboxes and the combobox
The first combobox (cbCriteria) contains the column names of the table and the second combobox (cbSearchCust) contains the data in the fields which are shown according to the criteria selected from the previous combobox (Cust_id, Cust_name or Cust_sname)
I want to connect the cbSearchCust to the textboxes so that when i change the customer from the textbox, the textboxes change. How can i do this?
Thanks
Luke
Can't you do something like:-
?
Dim MyVariable As String MyVariable = ComboBox1.Text TextBox1.Text = MyVariable
... the hat of 'is this a cat in a hat?'
•
•
Join Date: Oct 2006
Posts: 14
Reputation:
Rep Power: 3
Solved Threads: 0
Thanks for your help but I managed to fix it myself.
i'm attaching the code just in case some other problem pops up you might redirect them to this thread.
write this code in the cbSearchCust_selectedindexchanged sub
this code will change all your textboxes
i'm attaching the code just in case some other problem pops up you might redirect them to this thread.
write this code in the cbSearchCust_selectedindexchanged sub
me.databinding(dataset, "table").Position = cbSearchCust.selectedIndex
this code will change all your textboxes
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Need some help with a comboBox control (C#)
- return a value from javascript (PHP)
- about ComboBox problem (C)
- Issue related to combobox.... (VB.NET)
- Something wrong with this (Visual Basic 4 / 5 / 6)
- How to make javascript form autochange - "Onchange"? (JavaScript / DHTML / AJAX)
Other Threads in the VB.NET Forum
- Previous Thread: Syntax error in FROM clause.
- Next Thread: add new record to database



Linear Mode