GK in the UK
Registered User.
- Local time
- Today, 20:16
- Joined
- Dec 20, 2017
- Messages
- 274
Here's the issue: A form (#1) opened acDialog, can open another form (#2), Modal Pop-up with WindowMode:=acHidden but not acDialog and then set itself (form #2) Visible = true after stuff is passed in.
When form #2 is done it sets itself me.visible=false and form#1 gets the return values. As long as form #1 remains open, remember it was opened first, form #2 can be hidden and shown as many times as necessary.
So when form #1 is closed, form #2 remains loaded but hidden.
When form #1 is re-opened, form #2 seemingly can never be made visible again. There is no complaint, and the Let Property sub in form #2 runs, the final line is Me.Visible=true, but it doesn't happen. Here's the last bit of code in the Property Let sub of form #2:
So it seems that Me.visible=true is ignored, if that form (#2) was already open, but hidden, when the acDialog form called it.
So I somehow need to replicate the conditions that existed, when both forms were open, and the Property Let statement in form#2 could set itself visible.
Done the usual de/recompile and compact & repair.
When form #2 is done it sets itself me.visible=false and form#1 gets the return values. As long as form #1 remains open, remember it was opened first, form #2 can be hidden and shown as many times as necessary.
So when form #1 is closed, form #2 remains loaded but hidden.
When form #1 is re-opened, form #2 seemingly can never be made visible again. There is no complaint, and the Let Property sub in form #2 runs, the final line is Me.Visible=true, but it doesn't happen. Here's the last bit of code in the Property Let sub of form #2:
Code:
Me.Visible = True
Debug.Print "2.SrchFrm.Visible " & Me.Visible ' < FALSE !
Debug.Print "2.SrchFrm.Modal " & Me.Modal ' True
Debug.Print "2.SrchFrm.PopUp " & Me.PopUp ' True
MsgBox "3.Public Property Let SrchTxt: Me.Visible = " & Me.Visible ' < FALSE !
So it seems that Me.visible=true is ignored, if that form (#2) was already open, but hidden, when the acDialog form called it.
So I somehow need to replicate the conditions that existed, when both forms were open, and the Property Let statement in form#2 could set itself visible.
Done the usual de/recompile and compact & repair.