Matthew Snook
NW Salmon Database
- Local time
- Today, 08:22
- Joined
- Apr 19, 2001
- Messages
- 133
I have the following code straight from the lookup field wizard:
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Fish_ID] = '" & Me![Fish_IDLookup] & "'"
Me.Bookmark = rs.Bookmark
It works. Now I also want another form to locate the same bookmark I have just established on this form. Using the following code:
Forms![frm_Fish_ID].Bookmark = rs.Bookmark
Returns an error "...Database can't find the form 'frm_Fish_ID' referred to in a Macro expression or in Visual Basic code." I get this a lot when I'm trying to refer to another form--the problem is, I can't seem to predict the failure. That form does exist, and at other times the reference works. What is wrong in this situation?
Thanks,
Matt
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Fish_ID] = '" & Me![Fish_IDLookup] & "'"
Me.Bookmark = rs.Bookmark
It works. Now I also want another form to locate the same bookmark I have just established on this form. Using the following code:
Forms![frm_Fish_ID].Bookmark = rs.Bookmark
Returns an error "...Database can't find the form 'frm_Fish_ID' referred to in a Macro expression or in Visual Basic code." I get this a lot when I'm trying to refer to another form--the problem is, I can't seem to predict the failure. That form does exist, and at other times the reference works. What is wrong in this situation?
Thanks,
Matt