I have the following code that in itself works fine.
If CurrentProject.AllForms(myForm).IsLoaded = True Then
Forms![F-Enquiry].[SF-Actions].Form.Requery ' *** this is the problem line
End If
BUT in the line marked *** I need to replace the form name F-Enquiry with a variable name [myForm] that has previously been declared as the target form name.
Tried messing around using Controls.Form but got nowhere.
Can anyone help please?
Thanks as always.
If CurrentProject.AllForms(myForm).IsLoaded = True Then
Forms![F-Enquiry].[SF-Actions].Form.Requery ' *** this is the problem line
End If
BUT in the line marked *** I need to replace the form name F-Enquiry with a variable name [myForm] that has previously been declared as the target form name.
Tried messing around using Controls.Form but got nowhere.
Can anyone help please?
Thanks as always.