Results 1 to 3 of 3

Thread: [Resolved] Please help me debug this SQL

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2009
    Location
    Worthing, UK
    Posts
    62

    [Resolved] Please help me debug this SQL

    Right I'm hoping someone will be able to help me I'm trying to get some text boxes to fill relative to what is in the drop down menu

    To load the combobox with data I'm using the FillCombo code available on here.

    this is what fills the combo on frmLoad

    Code:
    Call FillCombo(cboCustomerName, cn, "SELECT CustomerName, CustomerID FROM tblCustomers ORDER BY CustomerName", "CustomerName", "CustomerID")
    Now i think the error is somewhere below, when you click on the drop down menu it errors
    Code:
    strSQL = "SELECT CustomerID, CustomerName " & "FROM tblCustomers " & "WHERE CustomerName = " & cboCustomerName.ItemData(cboCustomerName.ListIndex)
    Basically I need to set the variable CuID (Customer ID) to the CustomerID of the name that you select in the drop down menu, with the current SQL I'm getting errors.
    Last edited by RossW-S; May 4th, 2009 at 10:57 AM. Reason: Set as Resolved

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