1: Your main form ( PPortLC1 ) opens your second form ( LEDcolors )
Correct
2: After selections are made on your second form, you click a button that saves the data and quits, or a button that just quits the second form.
Correct
3: This calls a sub in your main form, that closes ALL forms.
Correct
4: You then recreate a new main form( PPortLC1 ) and show it, using the "Me" keyword.
frmPPortLC1.Show vbModal, Me
correct
The problem here, is that there is no "Me" anymore. All of your forms have been unloaded by calling:
PPortLC1.Close_Forms
a few lines before, so there is no "Me" to reference to.
I don't know why you are going through such a roundabout way of opening forms, but if you get rid of the "Me" at the end of that line, you might fix your problem.
Removing the Me, didn't work
I tryed all the usual Open forms Close forms but it wouldn't work right (see above posts)
I'm getting so frustrated with this. I've never ever had this trouble before just opening and closing forms.
It just dosen't make any sense. The main form I can open and close each time with no problems, but its when I close the subforms.
You might also try removing the vbModal from those lines as well. If I'm understanding correctly, you want to be able to open your second form from the main one, right? If you use VbModal to show the main form, then you can't open any other forms until you close it.
Which ( once I thought about it ) explains why it would work the first time, but not the second. The first time you ran your project, the main form is mon-modal. Once you closed and re-opened the main form as modal, that's where you would run into your problem.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.