Dear Experts,
I want to make the following code as "Global Module".
However, I'm stuck with making "FormName" variable since it's connected with "Forms!".
Any ideas will be appreciated. Thanks.
BTW, how put following code inside a box? (Like many of you do nicely...)
--------------------
Sub OpenLinkedForm(FormName As String, FormParam As String, ParamField As Variant)
If CurrentProject.AllForms(FormName).IsLoaded Then
Forms!FormName.Recordset.FindFirst FormParam & "=" & ParamField & ""
Else
End If
DoCmd.OpenForm FormName, , , , , , ParamField
End Sub
---------------------
I want to make the following code as "Global Module".
However, I'm stuck with making "FormName" variable since it's connected with "Forms!".
Any ideas will be appreciated. Thanks.
BTW, how put following code inside a box? (Like many of you do nicely...)
--------------------
Sub OpenLinkedForm(FormName As String, FormParam As String, ParamField As Variant)
If CurrentProject.AllForms(FormName).IsLoaded Then
Forms!FormName.Recordset.FindFirst FormParam & "=" & ParamField & ""
Else
End If
DoCmd.OpenForm FormName, , , , , , ParamField
End Sub
---------------------