If you need to set the variable "strRecipientName" before the "frmRecipesMain" is loaded, then you have the following options:
1) Use DoCmd.OpenForm as stated by Steve (IMHO, this approach is the cleanest)
2) Use a module to store as global variable as stated by June7
3) Use a hidden form to store the name in a text box (ugly approach)
For the purpose of form A setting a variable in form B ("frmRecipesMain") after form B is loaded, you can either use a module and store as global variable Or using the OO-approach and extend the form. Not exactly better, because you can still set it through the DoCmd.OpenForm approach, but for the purpose of exploring, here it is
In the code behind for form B:
Code:
Dim mStrRecipientName as String
.....
(some additional code)
.....
Public Sub SetRecipientName(ByVal pVal as String)
'Here you can even do some validation prior to setting the value
mStrRecipientName = pVal
End Sub
Then, in your code behind for the other form, you can do this. Just ensure that the frmRecipesMain is loaded before you call the subroutine.
Code:
.....
Forms!frmRecipesMain.SetRecipientName "some names"
.....