I am trying to use the Seek method to determine if a specific record exists. I have created a recordset with two indexes. One of the indexes is a text field and the other is numeric field. Seeking just on the text field works fine, but when I added the index to the numeric field, I get an error. The error is on the Seek line. The numeric field is related to an Autonum field on a related table and therefore cannot be changed (clear as mud??).
The seek code I’m using (see attachment) uses the value from a combobox as the value to be compared. That value is a string, by default. I tried to wrap the value in a type converter [ ” CInt(cboReport.Value) ” ], but that did nothing. I have tried to format that control as numeric, which didn’t appear to have an effect. After changing the format of the control, the value as displayed in the Watch Window showed it to be numeric instead of a string (that is, there were now no quote marks around the value), but I still get the error.
Does anyone have any ideas. They will be greatly appreciated.