[AccessD] Loading more than one instance of a form

Kenneth Ismert kismert at sbcglobal.net
Mon Jun 26 13:31:30 CDT 2006


This is a good example of a feature that's just not worth pursuing in
Access. Multiple form instances were a poorly thought-out feature in
the first place. The work-arounds you have to do to make multiple
instances work are all hacks, and ugly hacks at that. 

Do yourself a favor and restrict all Access development to single-form
instances. You can get 95% of the benefit of multiple instances at 5%
of the progamming effort. And other developers will be able to figure
out what the hell you are doing. 

Only Microsoft can make multi-instances work, and they are never going
to do it (at least, I'm not holding my breath). MS could fix this mess
if they did two things: 

1. A generic object multiple-instance creation method:

  Set rForm = Application.CreateFormInstance("myform") 

2. A built-in InstanceID property that keyed into the Forms collection:


  Form.InstanceID   ' Could be used in code below

  Function GetFormInstance(lInstanceID As Long) As Access.Form
      Set GetFormInstance = Forms(lInstanceID) 
  End Function

Until then, if you run into one of those rare situations where you
absolutely must have multiple instances, you're better off developing
it on another platform.

-Ken  




More information about the AccessD mailing list