Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Visual Basic, but need help with comobox in textbox..

Status
Not open for further replies.

GPRICE1

Technical User
Nov 14, 2011
2
US
Updating is working. But in the combox, the user will select a text. In when they select one of the option in the textbox, how do I make that option show in 0 in a other textbox. Example: if user choose red in combobox, how do in automatic show 1 in another textbox.

Dim iResponce As Integer
iResponce = MsgBox("Do You Wont To Make Changes To The Previous Day???", vbYesNo, "UPDATE PREVIOUS DAY...") ' This provides the YES, an No Box. That will give the user the option to choose from. If they will like to insert into the sql table or Update the previous data in the table...
If iResponce = vbYes Then ' They Clicked YES!
SQLUPDATE.Connection = SQLConnection
SQLUPDATE.CommandText = ("Update [QSB_Program] Set [Number of Problem]= " & TextBox1.Text & ", [Problem Type] = '" & ComboBox2.Text & "' where [Day] =" & NumericUpDown2.Value & " and [Month] = " & NumericUpDown1.Value & " and [Year] = " & ComboBox1.Text & " and [Problem Type] = '" & ComboBox2.Text & " '")
myReader.Close()
SQLUPDATE.ExecuteNonQuery()
MessageBox.Show("The Update Has Been Sent..")
 

hi,
if user choose red in combobox, how do in automatic show 1 in another textbox.
Code:
if combobox1.text = "red" then 
   textbox1.text = "1"
end if



Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top