I am stumped with the following code:
Private Sub Form_Open(Cancel As Integer)
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim intCounter As Integer
Dim strCounter As String
‘On Error GoTo Error_Form_Open
Set db = CurrentDb
Set rs = db.OpenRecordset(“tblTransactions”)
intCounter = Forms!frmTransactions!txtTransactionSelected
rs.FindFirst (“TransactionID = ” & Str(intCounter))
It fails on the FindFirst line with the error message Runtime error 3251 Operation is not supported for this type of object.
This proc runs when an unbound editing form opens. It needs to collect its data from the record referenced in the variable txtTransactionSelected on the form frmTransactions. intCounter is picking up the expected transaction number. So why does FindFirst fail?
Any help would be appreciated.
David