UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Pop Up Forms Visible, Access 2010    
 
   
AlBilly
post May 18 2017, 09:39 AM
Post#1



Posts: 105
Joined: 23-September 16



Hi,

I need to be able to set back a popup modal form to visible again but unable to do so. On my pop up I have a button to open a form and render invisible to popup
CODE
Private Sub cmdAddMoney_Click()
    'cacher et passer un argument
    Me.Form.Visible = False
    DoCmd.OpenForm "frm_AdminUsers", acNormal, , , , , "monnaie"
End Sub


works good but on the closing event of the other form, my popup remain invisible
CODE
Private Sub cmdClose_Click()
    'rafraichir la liste des rapports sur menu
    If CurrentProject.AllForms("frm_MenuPrincipal").IsLoaded Then
        Forms!frm_MenuPrincipal.Controls!cboReport.Requery
    ElseIf CurrentProject.AllForms("frm_AjoutCusip").IsLoaded Then
        Forms!frm_AjoutCusip.Visible = True
        Forms!frm_AjoutCusip.Controls!cboPays.Requery
        Forms!frm_AjoutCusip.Controls!cboMonnaie.Requery
    End If
    DoCmd.Close acForm, Me.Name
End Sub

the code goes thru properly but still hidden, what am I missing here ???
Thanks
This post has been edited by AlBilly: May 18 2017, 09:39 AM
Go to the top of the page
 
theDBguy
post May 18 2017, 10:18 AM
Post#2


Access Wiki and Forums Moderator
Posts: 70,666
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Not sure what else is showing on your screen but also try setting the focus to the popup form.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
rsindle
post May 18 2017, 11:08 AM
Post#3


UtterAccess VIP
Posts: 1,642
Joined: 25-June 04
From: Northern Virginia


if "frm_MenuPrincipal" is currently loaded, the other form never becomes visible again.

Try something like this. (Not sure if that's the exact intent, but it will make the other form visible).
HTH,
R-


Private Sub cmdClose_Click()
'rafraichir la liste des rapports sur menu
If CurrentProject.AllForms("frm_MenuPrincipal").IsLoaded Then
Forms!frm_MenuPrincipal.Controls!cboReport.Requery
end if
If CurrentProject.AllForms("frm_AjoutCusip").IsLoaded Then
Forms!frm_AjoutCusip.Visible = True
Forms!frm_AjoutCusip.Controls!cboPays.Requery
Forms!frm_AjoutCusip.Controls!cboMonnaie.Requery
End If
DoCmd.Close acForm, Me.Name
End Sub

Go to the top of the page
 
AlBilly
post May 18 2017, 11:29 AM
Post#4



Posts: 105
Joined: 23-September 16



the form "frm_Menu principal" is not loaded, that's why I posted, also tried setting the focus on it still not showing
I guess I will use full maximized forms instead

THanks for the help
This post has been edited by AlBilly: May 18 2017, 11:30 AM
Go to the top of the page
 
rsindle
post May 18 2017, 11:42 AM
Post#5


UtterAccess VIP
Posts: 1,642
Joined: 25-June 04
From: Northern Virginia


Personally, I hate maximized forms... but that's neither here nor there.
Did you try stepping through the code line by line?
That should be the ultimate test and answer.

Does the code hit the "Forms!frm_AjoutCusip.Visible = True" line?
Is there ANYTHING visible? If so, maybe the form that is visible is PopUP/Modal or something like that.


I use OpenArgs all the time to help with form navigation.
In the calling form:

CODE
    DoCmd.OpenForm "frmChildForm", , , , , , Me.Name
    If IsOpen("frmChildForm") Then
        Me.Visible = False
    End If


in the close button of the child form:


CODE
Private Sub btnClose_Click()

    If IsNull(Me.OpenArgs) Then
        MsgBox "OpenArgs is NULL!", vbCritical
    Else
        If IsOpen(Me.OpenArgs) Then
            Forms(Me.OpenArgs).Visible = True
        End If
    End If
        DoCmd.Close acForm, Me.Name

End Sub


let us know what you find out.
R-
Go to the top of the page
 
AlBilly
post May 18 2017, 12:24 PM
Post#6



Posts: 105
Joined: 23-September 16



I did try step by step and the code really hit the line Forms!frm_AjoutCusip.Visible = True and it does not show.
I just convert the popup forms to a normal one and just eliminate the visible line of code and works fine, it just waste of space for a form with 3 button and 5 fields only, specially on maximise

Thanks

albilly
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    22nd September 2017 - 02:00 PM