Hi Matthew
You can create multiple instances of a form by creating Form class variables
and using the New keyword:
Dim f1 as Form, f2 as Form
Set f1 = New Form_Employees
f1.Filter = "EmployeeID=4"
f1.FilterOn = True
f1.Visible = True
Set f2 = New Form_Employees
f2.DataEntry = True
f2.Visible = True
....
The form will only exist for as long as the class variable is in scope, so
normally you would declare these at module level.
You don't have the luxury of passing arguments to the OpenForm method, but
you could declare an array of forms and write your own function to which you
can pass arguments in the same way you do for OpenForm. Of the top of my
head, the only features you couldn't implement would be WindowMode:=acDialog
and OpenArgs. Other properties such as Filter,
AllowAdditions/Edits/Deletions, DataEntry, Visible, Caption, etc could
easily be passed as arguments.
--
Good Luck
Graham Mandeno [Access MVP]
Auckland, New Zealand
Matthew Pfluger said:
Can I open a new instance of a form and move it to a new record? If so,
could any problems arise if a user opens two instances in this way (set to
new records)?
Thanks,
Matthew Pfluger