Create Multiple Combo Boxes (VB 2008)?

May 3, 2012

First i am pretty new to coding and everything so yeah...I wish to make a distance and fuel calculator as my project. Included will be multiple combo boxes with different sets of information (The manufacturer of the vehicle, model of vehicle, the vehicles fuel use per 100Km, its transmission type, users choice of where they will depart from and arrive etc.) Is it possible to achieve this without using a lot of combo boxes? I've experimented using if statements for example:

if combobox1.selected item = "Holden" then
combobox2.visible = true (it's bad i know)

Then from this they would choose their model type in another combo box and then choose their transmission type etc..I don't want to use this because then it will mean i will have to do it for each and every combo box for each and every different set of data because making one 'visible = true' i will have to make the other 'visible = false' and this will cause problems when i start adding a lot onto it.

View 11 Replies


ADVERTISEMENT

Saving Data From A Text Field And Multiple Combo Boxes To A File On A Server In VB 2008?

Apr 28, 2010

saving data from a text field and multiple combo boxes to a file on a server in visual basic 2008

View 1 Replies

Combo Boxes And Arrays - Create For Random Numbers And Place Them Into For Different Text Boxes

Nov 3, 2010

So as the name states; I am a newer coder.

This is the code i have:

Public Sub RandomNumbers()
Dim s(4) As String
Dim RandomNumber As Byte

I don't know if you can tell what I am trying to do here, so I will try to explain. I what to create for random numbers and place them into for different text boxes. I also would like to do this with combo boxes and their selected indexes. So if the combo box has 10 items in it; the new selected index would be the random number generated above.

View 5 Replies

Using Multiple Combo Boxes?

May 17, 2011

I have a school project where i have a form that works as a class registration. There is cboGradeLevel and cboCourse and cboNumber. If cboGrade level is freshman i only want the numbers that start with 1 in cboName to be displayed, sophomore =2, junior =3, senior =3. Then i want cboCourse to work the same for the second number in cboNumber. english=1, history=2, math=3, science=4. So if freshman and history were selected i only want the numbers that start with 12- to be displayed. What can I use to make this happen?

View 2 Replies

Using Dataset For Multiple Combo Boxes?

May 13, 2011

I am very new to VB 2010 and SQL This is my first project.

Have multiple combo boxes that can use the same dataset.

The issue I have is that when I select data in one combo box the other combo box will change to what i selected fo rthe first box and visa-versa.

The only way I found around this is to create a new dataset for each combo box.

View 8 Replies

Passing Data Through Multiple Combo Boxes?

Jun 14, 2011

ok so What I am trying to do is have one combo box with employee name and once you choose the employee name for it to populate another combo box with the pay periods that the employee has in the database. So far I have that down and here is my code for it:

[Code]...

View 12 Replies

Save Multiple Combo/text Boxes Instead Of Just One?

Apr 21, 2012

how to make this save multiple combo/text boxes instead of just one, here is my save code which

Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
Dim Save As New SaveFileDialog

[Code]....

View 8 Replies

Preventing Duplicate Selections From Multiple Combo Boxes

Aug 6, 2009

Ive got 10 comboboxes on my form, each of them have the same items. I'm trying to get so that if I pick something from the first combo box it doesnt show up in the list for the 2nd box, etc. Also, I didnt want to just remove the item, incase the user changes their selection in a previous combobox. [code] Rest of the comboboxes have that last piece of code, with the boxes and stuff changed to the correct ones.

View 7 Replies

Preventing Duplicate Selections From Multiple Combo Boxes?

Jun 10, 2011

Ive got 10 comboboxes on my form, each of them have the same items. I'm trying to get so that if I pick something from the first combo box it doesnt show up in the list for the 2nd box, etc. Also, I didnt want to just remove the item, incase the user changes their selection in a previous combobox.Example of the code I used, as im on a different computer right now.

Code:
Dim cboList As New List(Of String)
Dim index1, index2, index3, index4, index5, index6, index7, index8, index9 As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[code]....

Rest of the comboboxes have that last piece of code, with the boxes and stuff changed to the correct ones.Problem is that it doesnt remove the previous selections correctly.

View 2 Replies

Multiple Text Boxes And Combo Box Selections Output To Txt File?

Nov 1, 2009

I'm using Vb .net 2008

I could use some advice/examples to acheive the following:

I have 1 form, 4 text boxes, (textbox1 ,2, 3, 4)

Textbox1 and Text box 3 and single line text boxes.. Textbox2 is multiline.. (a description field which can be as long or short as the user desires..)

Textbox 4 is a large multi-line textbox that will contain the output of Textbox1,2,3.

I need to find out how to output the contents typed into Textbox1,2 and 3 into Textbox4 while maintaining formatting..

For example, contents of Textbox1 should always be the first text displayed in textbox4, immediately under that should be the contents of Textbox2, and under that, Textbox3

I want to ensure that the text is displayed in that order even if the user enters information into Textbox3 first.. and still displayed in the proper order if Textbox2 has 1 line of text or 20 lines of text.

How could I do this? How can I make the text from one box always be inserted before or After text from another specific textbox when its displayed in the destination Textbox.. (think of Textbox4 like a "preview window" of sorts.. which will later be outputted to an actual txt file.

View 1 Replies

Bind Multiple Combo Boxes To Same Data Table With Minimal Code?

May 13, 2011

Bind multiple combo boxes to same data table with minimal code

View 19 Replies

Create A Timer Control For Each Channel With Combo Boxes For Days / Hours / Minutes / Radiobuttons For AM Or PM

Mar 11, 2012

I have an I/O device with 8 channels. I want to create a timer control for each channel with combo boxes for days, hours, minutes and radiobuttons for AM or PM. This is a crude (and not working) example of what I need:[code]

View 1 Replies

Linking Combo Boxes In VB 2008?

Feb 24, 2009

i wanted to link options selected from Comb box A (general) to specific options in combo box B (specific). I want to pick a word in Combo box A that has specific words/phrases in Combo Box B show. But not all the words to show in the combo box B if they aren't associated with the Word picked in Combo Box A. Ex.When "Soda" is picked in A, only "Coke, Sprite, Fanta" should be visible in combo box b, not everything else.

This is the code i used to make the boxes, but i don't know how to link them. Do i use an If/Else/ Case Else statement or what?

Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' fills the combo boxes with values

[Code].....

View 5 Replies

Multiple Combo Boxes Showing Data From The Same Data Source?

May 10, 2010

I have 5 combo boxes that need to show the same list of items that come from a single dataset table. I have managed to bind the datatable to the combo boxes no problem at all.. but when I run the application and select an item from one of the combo boxes all the others change to the item I selected. After some research I believe that this problem is something to do with using the one datasource so I have tried assigning the dataset datatable to 2 different variables and used them as datasources for 2 of the comboboxes but the same still happens.

A work around to this I can see is to call the same methods and SQL select statements 5 times over to get individual datasources for each combo box but this doing that sounds crazy to me. how I can get around this easily? Code snippet below shows 2 combox boxes and their datasources. I'm using VS2005, .Net 2

ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
ComboBox1.DataSource = AllergyListDataSet.Tables("ListOfAllergies")
ComboBox1.DisplayMember = "Condition"

[Code]....

View 3 Replies

Save Multiple Text-boxes And A Combo-box To A Text File

Nov 20, 2010

I need to to able to save multiple text-boxes and a combo-box to a text file. the thing is, when I go to save, I check out the .txt file manually and its saved all in one line, no spaces. when I go to "read" it with the 2nd part (<-----this is a 2 part Challenge) it even reads all from that one line in the text file. What i'm asking is how can I make my text-boxes saved in the text file on different lines. [Code]

View 10 Replies

VS 2008 Combo Boxes Streamreader And Variables?

Apr 21, 2009

I am trying to create a program that has the following aspects:2 combo boxes each containg a list of seven cities (both combo boxes have the same cities listed in them)text file containing distances to each city from one another eg if southampton is selected in one combo box and london in the other it will call 164 from the text file this means that each city needs to relate to a certain row or column number depending on the line in which the data is held in the text file. Here is what i have so far code wise:

Private Sub frmDistance_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim rowcolumn(7, 7) As Integer
Dim sr As IO.StreamReader = IO.File.OpenText("Distance.Txt")
Dim row, col As Integer

[Code]...

the problem is where i have the if statements that i have coloured red if i select southampton and london it will only display southampton to cardiff.

View 5 Replies

VS 2008 Data Binding Combo Boxes?

Mar 20, 2010

I've done data binding to my Combos and it works fine but my data base has over 260 000 entries, so I can't let user to move trough it, one by one entry until finds a match.What I am looking for is that user select value from Combo Boxes and Text Boxes get filled in with a matching values from the same row.Auto Complete helps in selection but I still can't work it out how to get values to my text boxes.

[Code]...

View 4 Replies

[2008] Application Settings & Combo Boxes?

Jan 24, 2009

I have a question concerning app settings. Is it possible to create a single setting which stores a list of text items and then use that list as the selection in a combo box? I'm trying to create a system that allows the user to determine which options are available in the combo box. In the past I have created a database table to store the options, but I have recently leanred that this solution comes with some inherent problems.

View 3 Replies

Send Data From Text Boxes / Combo Boxes To Access Database?

Jan 23, 2011

I'm in the middle of creating an application that will be used to input customer information whilst the customer is speaking to someone over the phone. This involves the customer giving the employee information such as name, address, postcode etc and the employee inputting that information into text boxes and combo boxes that are in the application.

What I would like to be able to do is after the customers information is given over the phone, I need to be able to send that information to a database which will probably most likely be done by button click. In this case, I'm using Microsoft Access. I'm also hoping that I can do this within Visual Basic coding.

The database is set out with multiple tables which include a customer table and a ticket table and both have multiple fields such as first name, surname in the customers table. Both of these tables are in use with the information that the customer gives over the phone.

I've already asked on other forums and people are where replying giving me third party programs that I could use to implement this, something I don't really want to do.

View 9 Replies

Sending Data From Text Boxes/combo Boxes To Access Database?

Jan 23, 2011

I'm in the middle of creating an application that will be used to input customer information whilst the customer is speaking to someone over the phone. This involves the customer giving the employee information such as name, address, postcode etc and the employee inputting that information into text boxes and combo boxes that are in the application.

What I would like to be able to do is after the customers information is given over the phone, I need to be able to send that information to a database which will probably most likely be done by button click. In this case, I'm using Microsoft Access. I'm also hoping that I can do this within Visual Basic coding.The database is set out with multiple tables which include a customer table and a ticket table and both have multiple fields such as first name, surname in the customers table. Both of these tables are in use with the information that the customer gives over the phone.

View 1 Replies

VS 2008 Return Multiple Table Rows To Multiple Text Boxes

Feb 27, 2011

visual basic 2008 express
access 2007 db

I am attempting to fill a form with multiple rows from an access table based off of a parameterized query. My query works fine but I don't want to return one row at a time, I want to return all rows that match my query in multiple text boxes. I know that I can use a datagrid view to accomplish this, but I would prefer the look of a textboxes on a form. I have read through many books and searched the internet forums but think I may just not know what to search for as nothing has worked yet. Can anyone point me in the right direction. So far I have tried setting the text box value to the row().item(), creating a different dataset for each row, and even setting variables for the results of the query to then be passed to the text boxes. Since none of this work, I don't really have any starting code to post. If I could just get a starting point I could work from there, so don't feel the need to code anything for me, just set me in the right direction.

View 3 Replies

Assign Values To Items In Combo Boxes And Check Boxes?

Feb 27, 2009

I used this code to created 2 combo boxes General and Specific...and Only show Specific (Combo when Combo A is chosen.....What i need now is to know how to assign specific values to the items in combo b (Specific).??? If i chose a sode, Fanta, i want the total price to be $10.00 (this price will show up in the finial price box..

View 4 Replies

Selecting Values Of Combo Boxes And List Boxes In Web Browser?

May 22, 2012

I am developing a program that makes it easier for users to log on to a website and search for specific data. I have the first portion finished in which I have a form with the Ax Web Browser control.

The web browser control navigates to a local website and automatically logs in for the end user. This is done by using code which automatically fills in the username and password and then submits the form to logon using something similar to this: WebBrowser1.Document.Forms.Item(, 0).elements("txtUsername").value = "user"

Once logged on - there is a search page which contains a combo box and list box. I am trying to set specific values for the combo box and list boxes.For example - the combo box on the website is titled: cbxDate and contains the following values: Today, Yesterday, This Week, This Month.

A list box titled: lstArea contains the following values: Zone A, Zone B, Zone C, All.I am trying to figure out if there is a way through code to select, in this example, "Yesterday" in the cbxDate and "Zone B" in the lstArea on the webpage.If anyone knows of a solution, please feel free to let me know. Be advised that I am using the Ax Web Browser Control.

View 2 Replies

Object Null Combo - Error When Try To Populate Some Combo Boxes With A Value

Nov 16, 2011

I am getting an error when i try to populate some combo boxes with a value, the combo box has values in and the right amount the code is getting the right number.

the error msg is "Object reference not set to an instance of an object."

View 7 Replies

VS 2008 Disable Text Boxes Until Combo Box Choice Is Made?

May 28, 2009

I currently have my cute little first program made... I'm just stepping into the water with this programming thing. I made a program where you can select a shape from a drop-down list and then input some values and click a button and get the area of the shape. I have it working so that when a certain shape is chosen, certain fields are disabled, such as when you pick "circle" from the combo box, the "length", "width", and "number of sides" text boxes are disabled but the "radius" text box is enabled, thus allowing you to enter the radius and find the area. I want to make it so that when you first load the program, all of the text boxes for the length, width, number of sides and radius are disabled until you select a shape from the list. Currently I'm using

[Code]...

This works for disabling the correct boxes when something is selected, but I don't know if I'm even on the right path with that first part.

View 7 Replies

VS 2008 Pulling Delimited Data And Putting Them In Combo Boxes

Jun 3, 2010

I have a PHP Page that displays airport information in a list in the following order

[code...]

Using that delimited method of ";" then a break, how can i put all of those into a combo box. There are a few hundred.

View 1 Replies

Clearing List Boxes And Combo Boxes?

Mar 20, 2009

what is the syntax to clear a combo box and also a list box?

View 3 Replies

VB 2008 - Updating Bound Table/datagrid From Text Boxes And Combo Box Data?

Sep 27, 2010

None of the Microsoft videos I have watched, or the other posts I have seen, have given me the pieces I need to understand this process. This is the one key piece of understanding that I need to finish about 4 different programs I have started in the last 2 years. All of them key on understanding the following processes:

View 1 Replies

VS 2008 Create The Form With A Button And Two Text Boxes - Move Text Between The Two Boxes

Oct 7, 2010

I am trying to follow the book 'Sams teach yourself VB 2008'. It was going well until the end of hour 4. For exercise 1 I have created the form with a button and two text boxes, but cannot work out the code I need to move text between the two boxes. The Object Browser does not seem to help - am I reading it wrong?

View 14 Replies

VS 2008 Manage Multiple Picture Boxes??

Aug 1, 2009

What would be the best way to manage multiple Picture Boxes?I am thinking an array, but if that is so, how would I build this array, and what would be stored in it?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved