Solved Copy a form and make it a popup

If you close the form and pop open, you may want to have it return to the same location it was in.
As far I know the only way to move document tabs is to open them in the correct order. So prior to opening the popup read the form's collection which will have the forms in the order as opened. Save that list somewhere like a collection. Pop up the form and close the tabbed version. When you close the pop up then close all the forms and reopen in the original order. This will give more of an illusion of popping open and then returning.
 
I know it's been a while so thanks for your help

STILL trying to get back to it :)
 
a technique I have used in the past is to have a popup container form with nothing in it except a subform control. The vba opens it then sets the source object to the required form - may also need to set filters, resize the form/subform as required, perhaps also set some other properties such as editing not allowed - these may need to be passed to the popup form as an open arg to be referenced in the form open/load events
 
Finally got back to it, I don't know if anyone is following this, but here is what works for me

The only problem remaining is the last item below

The Form Name is "Frm_Items"

I just created a static copy with the Pop Up property turned on called "PopUp_Items"

Then if you double click on the form (a column heading or something)

form.png


Private Sub Form_DblClick(Cancel As Integer)

Dim PopupFormName As String

PopupFormName = "PopUp_Items"

'Closes this form
DoCmd.Close

DoCmd.OpenForm PopupFormName
DoCmd.Maximize

End Sub

form_pop.png


And I can move it wherever

Then when I close "Popup_Items" I reopen the original form in the tabs.

Looks good, However....

When I double click again on Frm_Items, It doesn't pop up again and the database crashes when I try to close access

So that's the whole saga, I'll probably just have to open the form again manually

But if someone knows how to fix that (or setting the d@*n pop up property) please let me know

Thanks

Matt
 
a technique I have used in the past is to have a popup container form with nothing in it except a subform control. The vba opens it then sets the source object to the required form - may also need to set filters, resize the form/subform as required, perhaps also set some other properties such as editing not allowed - these may need to be passed to the popup form as an open arg to be referenced in the form open/load events
I want to try this as well, probably simpler overall
 
You should NOT close the current form when you open the popup. Just set its .Visible property to false to hide it.
 

Users who are viewing this thread

Back
Top Bottom