Access to "forms" can be handled like .NET forms, for example given inside
In the .net project create two forms {Form1, Form2} and in each form create a basic button {Button1}
In [Form1] use this code:
Public class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myform As New Form2
myform.Show()
End Sub
End class
and on [Form 2]:
Public class Form2
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Close()
End Sub
End class
So, the question I'm trying to understand is this: does Microsoft Access permit this? This is for an internal application and I am trying to figure out how to allow users to open more than one form at a time without resorting to {copy form_a} {paste form_a as form_b} {determine if form_a is already when they press the show_form button, and if so, run form_b, else, run form_a} {repeat nauseum declaration for form_c via form_infinity}
Ok, so if I can't do it in Access that's fine, [begin rant] at this point I'm already trying to overcome some very bad UI decisions as well as some bad tables. The original developers had no idea what an intersection table is or why it might even be remotely useful. And that's about 8 years of live data in it, so I already have quite a bit of work to do to make things work well enough. [End rant]
Thank you for listening and thanks for really good pointers to "here is a google search url link I found that really gave me the best answer to your question" natch as opposed to "RTFM n00b"; -]
Also, this is my first time on stackoverflow, although I am trying my best from this awesome UI, I think I did something wrong in the formatting, so any pointers there will be appreciated as well ...
a source to share
If you want to create multiple instances of the same form, there seems to be quite a few articles out there already discussing this.
a source to share
Yes, you can open multiple copies of the same form.
'Used to open the DailyFieldTicket form multiple times.
Public frmDFT as Form
Set frmDFT = New Form_DailyFieldTicket
frmDFT.SetFocus
Notes:
- If frmDFT is a variable defined in another form and you close another form, then this form instance is closed abruptly.
- If there are spaces in the form name, you need to replace them with _. Weirdness can occur if special characters are used in the form name. I don't remember the details right now. I now guarantee that these forms will be named without any spaces or non-alphanumeric characters only from the safe side. - I can't remember what's going on with OpenArgs. It can inherit the exposed cards of the first open shape, which can be confusing. - I vaguelly remember the problem with the variables used in the code, but it was 3 or 5 years ago, so I don't remember the details.
Thanks for asking. This gives me another page on my website or blog to create. Ahh, I see that Allen Brown already has a decent page on this topic.
a source to share