By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,486 Members | 2,152 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,486 IT Pros & Developers. It's quick & easy.

Open multiple instances of a form in MS Access

P: 3
Is there any way to open mulitple instances of a form in Access? I need my form to be active and open 3 or 4 times during the same session. The only thing I can think of is creating the form everytime. Is there an easier way?
Thanks,
Colin
Feb 26 '07 #1
Share this Question
Share on Google+
8 Replies


100+
P: 1,646
Hi Colin. Can you describe your problem in terms that are not your solution? i.e. My problem is x, y, z. Not I need to have multiple instances open because that is the answer to my problem and I only need to find out how to implement this. The answer to your problem might be much simpler than you think
Feb 26 '07 #2

P: 3
I am creating a database for security traders in a financial company. I have created a form that allows the trader to input the number of shares, price, etc... One of those basic no-brainer forms. What I am looking to do is allow the traders to start one trade, leave the form open and start a new trade using the same form but allow each form to operate independantly. Any ideas?
Feb 26 '07 #3

100+
P: 1,646
What is this process 'start a trade'?
Feb 26 '07 #4

P: 3
Starting a trade would involve pulling up the "Create a new Trade" form then punching in the relavant data ie. price, quantity, etc.
However the time between starting a trade and finishing a trade could be half an hour or so. I would like the traders to be able to leave their original "Create a new Trade" form open while calling up a second instance of the "Create a new Trade" form and start a new trade.
Feb 26 '07 #5

ADezii
Expert 5K+
P: 8,597
Is there any way to open mulitple instances of a form in Access? I need my form to be active and open 3 or 4 times during the same session. The only thing I can think of is creating the form everytime. Is there an easier way?
Thanks,
Colin
An Access Form is nothing more than a Class, and as such new Instances of it can be created. The following code will create 4 New Instances of a Form named frmTest, place them in a Public Array declared as frmTest, Cascade the Form Windows, then make frmTest the Current Form. All this is accomplished via the Click() Event of a Command Button on frmTest. BTW, each Form Instance can de identified by its Caption. Good Luck.
Expand|Select|Wrap|Line Numbers
  1. 'Public Array to hold Form Instances
  2. Public MyFormCollection(1 To 4) As Form_frmTest
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command15_Click()
  2. Dim intCounter As Integer
  3.  
  4. For intCounter = 1 To 4
  5.    Set MyFormCollection(intCounter) = New Form_frmTest
  6.    MyFormCollection(intCounter).Visible = True
  7.  
  8.    MyFormCollection(intCounter).Caption = "Form #" & intCounter
  9.  
  10.    DoCmd.RunCommand acCmdWindowCascade
  11. Next intCounter
  12.  
  13. Forms!frmTest.SetFocus
  14. End Sub
Feb 26 '07 #6

100+
P: 1,646
OK. This is why I wanted in on the 'problem' rather than the fix. Would life not be simpler if each new trade appeared in a listbox and could be clicked to close it?
Feb 26 '07 #7

NeoPa
Expert Mod 15k+
P: 31,186
I think I see where you're going with this one Will, but unless the trades are very simple then I think the multiple instance solution may prove the most practical. I've never had to use it myself and it's a little complicated to set up certainly, but for the operator to select an open trade and update the details I think multiple forms would be required.
Feb 28 '07 #8

Rabbit
Expert Mod 10K+
P: 12,315
I would also think you would want to set Data Entry to yes. I don't know how updates to the table would affect each other.
Feb 28 '07 #9

Post your reply

Sign in to post your reply or Sign up for a free account.