Just build some custom properites for the form, and make them public.
Public Property LET SSN(strS as string)
' this sets up the forms SSN number
m_ssn = strS
end Properyty
Public Propery GET SSN as string
' this propery retuns the SSN number
SSN = m_ssn
end Proprty
Public Function RunStuff
' cool code to do whatever proicessing you want
end function.
Now,
Set frm = New form_myform
frm.SSN = "1233"
msgbox "the fomrs SSN value we passed is " & frm.SSN
frm.SSN = "2343"
frm.Whatever Else You wna to pass to form
frm. Even smore
Now, get the form to run some code based on the values passed
frm.RunStuff
Notice how even intei-sense works! So, you are building objects here!!
So, don't think of passing values back and forth, but think of a form as a
object, and you set/return values, and any public function defined in the
forms code is a method of that form. While ms-access is not a object
orientated programming environment, forms are in fact object, and the old
fashioned idea of passing values has given way to setting values of the
object..and then telling the object what to do.