Forms :: Add Items To A Combo Box Depending On What The User Selects In The Other?

Jun 2, 2010

I have 2 combo boxes. One is in a form called subcat_selector.vb

on the button Pick Sub Catagory.click event it shows the subcat_selector form. form there, the onload event:
Dim button As DialogResult

[Code].....

View 10 Replies


ADVERTISEMENT

Change The Value Of ComboBox1 Depending On What The User Selects In ComboBox2

Nov 23, 2011

In my datagridview, I want to be able to change the value of comboBox1 depending on what the user selects in comboBox2

I had this working correctly, however if I move onto a new line in my gridview and select a different value in the second row it changes the previous row also. For instance, on Row1, if comboBox1 = A, combox2 = B

Then on Row2, if comBox1 = Y, comboBox2 = Z

However, when I change Row1, Row2 is also changed to reflect what was chosen in Row1. Is there a way I can tailor it to each specific row?

View 7 Replies

Ensure User Selects Item From A Combo Box And Listview?

Jan 4, 2011

I have a form with a drop down combo box and a list view. The user selects a date from the combo box and then they are to select an item from the list view. I want to ensure that the user has selected a date from the combo box before processing the information from the selection in the list view.

If cboYEARMONTH.SelectedItem = Nothing Then MessageBox.Show("Please Select a Year Month")

View 1 Replies

Forms :: How To Get Value Of Item Which User Selects From ComboBox

Nov 1, 2010

I am creating the items in a combobox in my code behind. I am setting the display member and the value member. When the user makes a selection from the combo box, I need to get the value of the selected item. I have written some code, but when I step through it, it says that the selectedvalue is Nothing.

Here is the code where I am creating the items in the combo box:
Do While drReader.Read
cboTheater.Items.Add(drReader("TheaterDesc"))
cboTheater.ValueMember = CStr(drReader("TheaterID"))
cboTheater.DisplayMember = CStr(drReader("TheaterDesc"))
Loop

In the selected index change event for the combo box, I am doing the following:
Dim strTheater As String
strTheater = CStr(cboTheater.SelectedValue)
When I step thru the code, strTheater is Nothing

View 2 Replies

Forms :: User Selects A File Using An OpenFileDialog

Sep 21, 2010

I have a form on which the user selects a file using an openFileDialog. The selected filepath is then processed, which may take 10-20 seconds before the user is presented with the results.I'm finding that the once the user selects the file (clicking the OK button on the openFileDialog), the openFileDialog remains open until all of the processing going on in the background is completed. Once the processing has finished the openFileDialog disappears and the results are shown.The problem is that whilst the openFileDialog remains open on screen, it is not apparent to the user that anything is happening in the background. I do actually have a textbox which updates the user with messages showing the progress. However the openFileDialog hides the messages until it closes, essentially making the progress messages useless.What I'm trying to do is have the openFileDialog close immediately that the user selects a file. Then the processing can continue without the openFileDialog obscuring my form.

View 5 Replies

Forms :: SelectedIndexChanged - Test For When The User Clicks On It And Actually Selects A Value From It?

May 27, 2010

I have a combo box and use the SelectedIndexChanged event. I noticed when I assign a value to the combo box that this event fires even though the user does not click on the control. Can you tell me how to test for when the user clicks on it and actually selects a value from it?

View 19 Replies

Asp.net - List Box Selected Index - Various Items Inserted Depending On The User Selection

Jan 18, 2012

I seem to be having issues with the selected index on a list box.

The list box is having various items inserted depending on the user selection. An example would be:

LiIndex = ListBox1.Items.Count
ListBox1.Items.Insert(LiIndex, "Item1")

LiIndex = ListBox1.Items.Count
ListBox1.Items.Insert(LiIndex, "AND")

[CODE]......................

This all work and displays without a problem. The issue I have is if I select the second of the two AND's. If I click the second "AND" in the list and then a button to fire a method, the selected index is always the index of the first "AND". Dim listIndex as integer = ListBox1.SelectedIndex

I can't work out why, the listbox itself will always show the second one as selected, but the action will happen against the first one.

View 2 Replies

Forms :: Get Items In Combo Box To Appear In A List Box Fb?

May 22, 2011

how do i get items in combo box to appear in a list box

View 1 Replies

Forms :: Get Value Of Combo Box From One User Control To Another

Aug 28, 2009

i am using vb.net 2005 to developed desktop application ,I am having two windows form user control , the first control name con.vb containing the design and code for connecting to database and getting a list of my project values in combo box.Now the second user control report.vb which i am using to generate some reports , since the code behind is using connection to connect to various project database , so i want to get the value of First user control into another how i can get the i have tried the below but its giving me error in run time but no error in design or code behind [code]

View 4 Replies

VS 2005 - Gotchas With Docked Forms - Forms - Displayed Using Menu Items To Display Information To User

Nov 10, 2011

We have an application that has a main form with a map on it. Right now the paradigm is to have forms that are displayed using menu items to display information to the user. Most of these forms are modal forms, but a couple are non-modal forms that interact with the map. For some of the forms, it really would make for a better user experience if we could dock them in the main form of the app and allow the user to see both the form and the map. For instance. We could have a list of map features in a docked window, and select one of the items on the list and have the map zoom to that feature. Or do the reverse: let the users select a map item and have a docked window that shows details of the feature. Sounds great, but I wonder about what sort of gotchas we may encounter. In particular, what if we have two windows docked at the same time? Could we get tangled up in our event code?

View 2 Replies

Fill Combobox Depending On Value Of Other Combo

Feb 27, 2010

I have 2 comboboxes. When I choose a country in cboLand I want only the states to show in cboStaat that are associated with the country from cboLand. I tried the code below but I get all different error messages. Perhaps you can see something in my code that I missed.

[Code]...

View 3 Replies

Fill A Combo Box With Data From A Database But Depending On How Much A Progressbar Is Filled?

Jan 24, 2012

So im trying to fill a combo box with data from a database but depending on how much a pregressbar is filled THis is what im trying:

Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Form1.ProgressBar9.Value <= 10 Then
Me.Level1TableAdapter.Fill(Me.CTDBDataSet1.Level1)

[code]....

View 2 Replies

Make A New Database Where The User Selects?

Mar 5, 2012

I use vb.net express 2010. I have tried to find a way to add an EULA to my project but have not found it (nor any solutions online).

does express have the ability to add an EULA?also is there a way to get the setup file to move the database into a particular area OR have it make a new database where the user selects?

View 1 Replies

Unable To Capture The Value Of A Cell When The User Selects A Row?

Jun 12, 2011

How would you be able to Capture the Value of a Cell when the User Selects a Row?

View 7 Replies

User Selects Option1 From The Drop Down List?

Jan 12, 2010

i have created a comboBox and want to set it so when a user selects option1 from the drop down list. a Text box populates with text for the user to see.

View 5 Replies

VS 2008 - My.Settings - If When The User Selects No, Then The App Setting Is Nothing

Dec 6, 2011

I am not sure what the heck I am doing wrong. I would like if when the user selects no, then the app setting is nothing. By nothing I mean nothing, I am using "Nothing" to test but its not working it returns whatever is in the richtextbox

This is in my formclosing event

Dim msg As String = "Do you want to save your comments?"
MessageBox.Show(msg, "Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If DialogResult = Windows.Forms.DialogResult.Yes Then

[CODE]...

View 2 Replies

VS 2008 : Execute The Program After The User Selects It?

Aug 10, 2009

How do I make it so that after the user selects a program it gets executed?Also can I the the OpenFileDialog1 to anything else?

View 13 Replies

Assign A Number From A Row The User Selects In A DataGridView To A Textbox

Jul 5, 2009

I'm trying to assign a number from a row the user selects in a DataGridView to a textbox. On the dgvProducts_CellContentClick event I wish to take whats in column(6) to a textbox.

[Code]...

View 1 Replies

Desk App - End The Details That The User Selects And Types From The Form?

Oct 19, 2010

i am trying to design and code a simple help desk program. i would like it to send the details that the user selects and types from the form i have designed (see picture) and also to send the username, computer name, servername and a copy of the windows event log for the previous 15 minutes, to a designated email address in pretend I.T. department.

View 4 Replies

Populating Text Boxes When A User Selects A Company Name From The Cbo Box?

Apr 27, 2012

I am populating text boxes when a user selects a company name from the cbo box. When I make the first selection everything looks good, but when i make another selection the text boxes do not clear and repopulate with the new values. Here is the code in the selected index change event.

[Code]...

View 4 Replies

Retrieve Some Infomation From Record That A User Selects In DataGridView

Jun 14, 2012

I have a datagridview that is filled by a query in the dataabse via the DataSource property.What I want to retrieve some infomation from the record that a user selects in the DataGridView. How do I do that? i've been looking for some time now but I can;t figure it out.

View 6 Replies

Sending The Value Of Payor To The Fill Query Once The User Selects?

Sep 7, 2009

I have a field called "payor" where the user selectes either "All, Medicare, Managed care" from a drop down list. I am sending the value of payor to the Fill query once the user selects the one they want.

I have no problem with coding 'Where (payor = @payor) if the user doesn't pick ALL, but what code do I need to include ALL records if the user selects "ALL" in the where statement?

View 7 Replies

User Selects A Movie From A Combobox And The Corresponding File Opens?

Jan 6, 2010

I am working on cinema booking system project in vb.net..I have to book seats in the cinema..I have created a file for seat reservation for every movie..The seating is such that there are 18 seats and in the file have written 0s and 1s indicating reserved and vacant seats respectively..User selects a movie from a combobox and the corresponding file opens..We have to change the color of those seats which are already booked to red.Here is my code but it doesnt work..

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles movies.SelectedIndexChanged Dim Seat As Button() = New Button() {Form4.Button1, Form4.Button2, Form4.Button3, Form4.Button4, Form4.Button5, Form4.Button6, Form4.Button7, Form4.Button8, Form4.Button9, Form4.Button10, Form4.Button11, Form4.Button12, Form4.Button13, Form4.Button14, Form4.Button15, Form4.Button16, Form4.Button17, Form4.Button18}

[Code]...

View 5 Replies

User Selects A Quantity Of Dogs A Messagebox Is Displayed?

Dec 2, 2009

I am using a Message box with buttons Yes/No. If the user selects a quantity of Dogs a Messagebox is displayed asking if all the dogs have been vaccinated. If the user says yes I want them to be able to proceed. If the user selects No I want the number in the combo box to delete and go back to zero.My code for the button selected is this:

Dim button As DialogResult If button = Windows.Forms.DialogResult.Yes Then btnCalculate.Focus()
End If
If button = Windows.Forms.DialogResult.No Then

[Code]...

View 6 Replies

Asp.net - Hide Button When The Page Loads Until The User Selects Item 1 Or 2 ?

Apr 18, 2012

I have a simple web for that has a dropdown list and a button on the form.The dropdown list is bound to a table in my database and holds three values with idents between 1 and 3 (Weekly,Monthly, Please Select).I have set my datasource to pull back item 3 (Please Select) as the first item in the dropdown list to prompt the user to select an option. Items 1 & 2 have data assigned to them and this pulls back the relevent data for these options.

Here is my problem. I need to hide my button when the page loads until the user selects item 1 or 2 and would like the button to be hidden of option 3 is selected. I have tried to complete this in my page load event and the code for the dropdown list but i cannot seem to get this to work.

If IsNumeric(DropDownList1.SelectedValue) = 3 Then
btnAddAgendaTemplate.Visible = False
End If

View 3 Replies

Create A For Loop That Will Display The Values A User Selects For A Listbox?

Feb 21, 2009

I'm trying to create a for loop that will display the values (favorite programming languages) a user selects for a listbox.

So far I have this:

Dim selectedLanguages As String = ""
For intLoopIndex As Integer = 0 To languageListBox.Items.Count - 1

[code]....

So far, no matter how many items they select it will display a comma even if only one item is selected, example "C#,"However this is what I need it to do:

1. If the user selects one programming language than it should just printout the selected course with a period right after it. Example: C#.

2. If the user selects two languages it needs to have the text "and" between them followed by a period. Example: VisualBasic.Net and C#.

3. If the user selects three or more languages it needs to seperate them like this for example (again with a period at the end): VisualBasic.Net, C#, and Asp.net.

View 2 Replies

User Selects An Excel File And The Contents Are Loaded Into A DataGrid?

Dec 20, 2011

I'm in the process of adapting a current program that I've created to automate it. **Current State***User selects an excel file and the contents are loaded into a DataGrid User can select which environment to run their query against (stage/prod) Program completes processing and updates datagrid with new values User can export datagrid to excel What I'd like to do is centralize the program on one computer and have it monitor a network folder for creation of a specific file type (*.xls or *.xlsx). If one of these is created in that folder then I want to add that file to a queue for processing. Once done processing I want to send the results as an attachment to an email to the user that created the file. After a file is processed I would like to remove it from that folder as well (into a diff folder of completed items).

[Code]...

View 8 Replies

Programmatically Add Combo Box Items To A Combo Box In A Datagrid?

Mar 11, 2010

I know how to add the items during design time but how do you add the items through code. I want to fill the combo box in the datagrid with the results of an SQL query?

View 3 Replies

Return An Error Message When The User Selects An Invalid File Path?

Apr 17, 2012

I'm using Microsoft Visual Basic 2008 Express Edition. I have a Folder Dialog Browser added in my form and I call it when the user presses a button. The folder path string is stored in a string variable and displayed as text in a text box. (maybe I should use a combo box)

My question is: If the user inputs by hand a non existent path, how do I return an error message, stop the file creation into the invalid path, and return to my main form?

View 1 Replies

Use A Button (A) To Launch A Prompt Where User Selects Directory Path To An Executable Program?

Aug 27, 2011

It's probably the most basic of things, but all I can find is how to launch a program, and not with the interactions I desire. Any tips as to the terms to use to search for answers, or links to topics regarding questions similar to mine, would be very appreciated. I have a wealth of info to read through, but I could use your knowledge to save myself time.Here is what I am trying to do:

Use a Button (A) to Launch a Prompt where User Selects Directory Path to an executable Program. The Selection is to be Persistent after the initial selection (saved in a settings file i assume?), and the Selected Path (or just "programname.exe") is to be Displayed in a Text Field (B). Launch Selected and Indicated Program via a Launch Button (C)

View 3 Replies







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