Solved Copy a form and make it a popup

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
 

Users who are viewing this thread

Back
Top Bottom