JonnyCab
Jun 15th, 2000, 04:07 PM
Hi all.
I am using a discounted ADO recordset and need to search it to return a value.
The recordset has two fields. If the first field of a record = cmbContract.text (The text value of a combo box)
then I want to return the second field from the same record to fill a text box on a form.
From what I hear the 'Find' command is the way to go but Im not sure how to use it. I've tried using the code below but it is obviously not in the right format
strRecord = rsContract.Find("ContractCode = " & cmbContract, , adSearchForward)
Any code samples would be much appreciated.
Cheers
Jonny
I am using a discounted ADO recordset and need to search it to return a value.
The recordset has two fields. If the first field of a record = cmbContract.text (The text value of a combo box)
then I want to return the second field from the same record to fill a text box on a form.
From what I hear the 'Find' command is the way to go but Im not sure how to use it. I've tried using the code below but it is obviously not in the right format
strRecord = rsContract.Find("ContractCode = " & cmbContract, , adSearchForward)
Any code samples would be much appreciated.
Cheers
Jonny