unrecognizable forms

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
 
The form "frm_Fish_ID" must be open at the time the code is executed.

RDH
 
And visible! Still trying...

Could it be that the "frm_Fish_ID" is in the wrong state? A "not in list" event on "frm_Fish_ID" generates the current form, and when I return to "frm_Fish_ID" it's still functioning with that data in the combo box which generates the "not in list" event. Maybe I need to get rid of that data to return the "frm_Fish_ID" to a neutral state?

Matt

[This message has been edited by Matthew Snook (edited 03-21-2002).]
 

Users who are viewing this thread

Back
Top Bottom