INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

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

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

(OP)
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..")

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


hi,

Quote:

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,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

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

(OP)
Thanks. That worked.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close