Run-Time Error 3070 when using FindFirst

R

Rocky

I have two forms, one with summary data and one showing the full
record. I am trying to open the full record, by double clicking on
the summary record.

Both forms use the same record set.

Whe I do a debugm the "me.ConId" gives the right value. The error
says that the that MS Access does not recognise "ContactId" as a valid
fieldname.

ConId is an alais of ContactId and formated as an integer

I have checked the groups for this error, but only found solutions for
text related data. Not sure if it applies to number dat.

The code used is as follows:-
Private Sub ConId_DblClick(Cancel As Integer)
Dim rs As DAO.Recordset

If Not IsNull(Me.ConId) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Open Form where Customer Records are kept
DoCmd.OpenForm "CustCard", acNormal, "", "", , acNormal
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[ContactId] = " & Me.ConId
If rs.NoMatch Then
MsgBox "Not found: filtered?"
Else
'Display the found record in the form.
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If


End Sub

Rocky
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top