Whew, it's been a while since I posted. Fogive me all for I have...
anyway.
I would like to be able to write a method of an object that could
accept a string and set the corresponding form. It an easy thing to
do if I am talking about a recordset. I could simply loop through the
recordset collection, find the one that I wanted, and then set my
object to the one that I found.
But forms are seemingly different. The code out there demands that a
form either be open or in design view. That would totally defeat the
point of what I am trying to do. From what I find in help, if I want
to loop through all of the forms open or not I have to go through the
documents collection. That is fine, but when I find the form I want,
I am still left with a string variable that I want to set to a form,
and that just won't work. You need a text literal to set an object to
as far as I know.
Public frmName as form
Public sub setThatForm(StrFormName)
WHAT GOES HERE?
end sub