Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DAO function unknown error 3072

Status
Not open for further replies.

margamo

Technical User
Feb 1, 2002
9
US
I have the following code:
' Find the record that matches the control.
Dim rs As DAO.Recordset

Set rs = Me.Recordset.Clone
rs.FindFirst "[LastFour] = '" & Me![Combo54] & "'"
Me.Bookmark = rs.Bookmark

MsgBox "Record not found"
End If

rs.Close
half the time it works and half the time I an error message: Unknow function error 3072. Cand some one please tell me what is going on here?
Thanks,
Margamo
 
Can't say for sure, but some suggestions:

[tt]Set rs = Me.RecordsetClone
rs.FindFirst "[LastFour] = '" & Me![Combo54] & "'"
If not rs.nomatch then
Me.Bookmark = rs.Bookmark
Else
MsgBox "Record not found"
End If
set rs = nothing[/tt]

1 - the recordsetclone in stead of the clone method of the recordset object
2 - do a test for found record (else assigning bookmark errors - perhaps this error?)
3 - you haven't opened any recordset, so just set it to nothing, don't close it

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top