Results 1 to 25 of 25

Thread: SQL query question [Resolved]

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2005
    Location
    Melbourne, Australia
    Posts
    39

    Resolved SQL query question [Resolved]

    I have a db with a table called Customers. There are two columns in Customers: CustomerCode and CustomerName.

    My vb form has a combo box with a list of the customer code, a text box, and a button.

    What I want to do is: If a user chooses a customer code from the combo box I want the customer name to show in the text box.

    This is the SQL query that I have been using:

    strSQL = "SELECT CustomerName FROM Customers WHERE CustomerCode = '" & cboCustomerCode.Text & "'"

    The problem i'm having is that the result of the customer name will not show on the text box.

    This is what I used to put the result in the text box:

    txtCustomerName = strSQL

    Is this correct?
    Last edited by Kalilian; Jul 10th, 2005 at 06:42 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width