jleach
Registered User.
- Local time
- Yesterday, 21:50
- Joined
- Jan 4, 2012
- Messages
- 306
Depending on the size of your project and your existing code complexity, it may be worthwhile to write some wrapper functions:
(aircode)
Then replace DoCmd.OpenForms with OpenForm (and test carefully! This would code most common use cases, but not all)
(aircode)
Code:
Function OpenForm(FormName As String, Optional args As Variant = Null)
Const PANEL_FORMS As String = ";ThisForm;ThatForm;"
If Instr(1, PANEL_FORMS, ";" & FormName & ";") Then
'open panel form
UIShell.OpenPanel(FormName, args)
Else
'regular forms
If IsNull(args) Then
DoCmd.OpenForm
Else
DoCmd.OpenForm FormName, , , , , args
End If
End If
End Function
Then replace DoCmd.OpenForms with OpenForm (and test carefully! This would code most common use cases, but not all)