I am receiving the Method or data member not found error message when I attempt to add a new record in form view. I have been working in an old 2002-2003 version of Access until last week when it was converted to 2007. The old version allowed for additions just fine but now after the conversion something is wrong. The code is below. I underlined the line throwing the error message (FindFirst). Any help is very much appreciated. Code is not my strong suit.
'Open form to new record
gstrCallingForm = Me.Name
strDocName = "frmNewApplicant"
strLinkCriteria = "ApplicantID = " & NewApplicantKey()
Me.Visible = False
DoCmd.OpenForm FormName:=strDocName, _
wherecondition:=strLinkCriteria, WindowMode:=acDialog
'Requery index form to pick up the new record, then
'set the bookmark to this new record.
Me.Requery
Set rst = Me.RecordsetClone
strLinkCriteria = "tblApplicants01.ApplicantKey = " & NewApplicantKey()
If Me.RecordsetClone.RecordCount > 0 Then
'If first new record was cancelled, would fail.
rst.FindFirst strLinkCriteria
If Not rst.EOF Then
Me.Bookmark = rst.Bookmark
End If
End If
cmdNewRecord.Enabled = False
cmdDetail.Enabled = False
Exit_Procedure:
On Error Resume Next
rst.Close
Set rst = Nothing
Exit Sub
Error_Handler:
'Open form to new record
gstrCallingForm = Me.Name
strDocName = "frmNewApplicant"
strLinkCriteria = "ApplicantID = " & NewApplicantKey()
Me.Visible = False
DoCmd.OpenForm FormName:=strDocName, _
wherecondition:=strLinkCriteria, WindowMode:=acDialog
'Requery index form to pick up the new record, then
'set the bookmark to this new record.
Me.Requery
Set rst = Me.RecordsetClone
strLinkCriteria = "tblApplicants01.ApplicantKey = " & NewApplicantKey()
If Me.RecordsetClone.RecordCount > 0 Then
'If first new record was cancelled, would fail.
rst.FindFirst strLinkCriteria
If Not rst.EOF Then
Me.Bookmark = rst.Bookmark
End If
End If
cmdNewRecord.Enabled = False
cmdDetail.Enabled = False
Exit_Procedure:
On Error Resume Next
rst.Close
Set rst = Nothing
Exit Sub
Error_Handler: