-
Hi,
I'm building a VB5 front-end for an Access 97 database using a standard DAO data control with a dynaset type recordset.
I have a DBCombo control on my form which uses Ref (Autonumber/Primary Key)from tblMain as it's ListField.
The DBCombo is being populated OK but when the user selects a value from the list I want all the other bound controls on the form to display information from the record the user selects. This is not happening.
I have been using the following code:
dtaReport.Recordset.FindFirst "Ref = " & cboIncidentList
dtaReport.Refresh
At run time both these lines of code produce the following error:
'Object does not support this property or method'
Any help would be very much appreciated.
Best Regards,
Rob Brown.
-
DAO Find command needs a DAO.Index="IndexedVaraiable" first if it is a table. If it is a Dynaset I had problems getting it to work right so I switched to ADO although the same method should work in DAO. Use DAO.Filter="SearchField='" & WhatToSearchFor.text & "'"
Check your help topics along that line