Hey guys I ws wondering. I have a database made in access 2000 that is called compound names.

i use it in a program where the user enters a compound like FeO2 or something in text1 and press the search button. i would like it so it would search the database to look for the compound in text1 and if there is a match then put the compound name which is in the column debside the first colum that has compounds and put it in text2.

If there is not a match found then have text2 say no matches found.

I can use this code right?
VB Code:
  1. Dim con As ADODB.Connection
  2. Dim strSQL As String
  3. Dim strCol As String
  4. Set con = New ADODB.Connection
  5. con.CursorLocation = adUseClient
  6. con.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.path & "\compoundname.mdb;" & "Jet OLEDB:Database Password=****;"
  7. strSQL = "SELECT * FROM table1"
  8. strCol = "compound"
  9. Call FillCombo(List2, con, strSQL, strCol)
  10. con.Close
  11. Set con = Nothing

but see this code originally was for another prog i had, but i dont want it search using what is in list 2, i would like it to use text1

Can you hook a brotha up? Thanks alot!!!!!