trying to find a record in a Recordset,
both with a numeric value, and with a string value.

but ADO wont let me...
VB Code:
  1. Private Sub CboPrice_Click()
  2. Dim ConnString As String
  3. ConnString = "Provider= Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & App.Path & "\ProPsmDb.mdb;" & "Persist Security Info=False"
  4. Set CN_Price = New ADODB.Connection
  5. CN_Price.ConnectionString = ConnString
  6. CN_Price.Open ConnString
  7. Set RS_Price = New ADODB.Recordset
  8. RS_Price.Open "select * from price", CN_Price, adOpenStatic, adLockOptimistic, adCmdText
  9.  
  10. RS_Price.Find "ptext" = CboPrice.Text ' Ptext is a string value
  11. RS_Price.Find "id" = CboPrice.ItemData(CboPrice.ListIndex) ' numeric value
  12.  
  13. txtName.Text = RS_Price!pricename
  14. txtPrice.Text = RS_Price!price
errors are:
1. "Argument are of the wrong type" = search with string value
2. "type mismatch" = serarch with numeric value

why wont it find?? would very much appreciate any help...

tnx in advance 2 any ideas/suggestions.