wlwebb
asked on
Access - If CurrentProject.AllForms - problem closing form
Hello all
Probably another stupid typo but I've checked everything and even copy and pasted names of the form so I wouldn't have a typo.......
I have a Form, when I click the Save control button I have code that looks for other open but hidden forms and makes them visible and then thought it would close the form.....
It works at making the hidden form visible........BUT.......
I can't get it to close the original form??????
As you can tell it's the
DoCmd.Close , "frm_LVLReportingControlTo tals"
I've tried it without quotations, I've tried it without quotations and Forms!.....
It unhides the frm_ShiftReportingLVL alright but puts the form I'm trying to close in the background behind the Form made visible and just leaves it open.........
Where am I messing up????????
Probably another stupid typo but I've checked everything and even copy and pasted names of the form so I wouldn't have a typo.......
I have a Form, when I click the Save control button I have code that looks for other open but hidden forms and makes them visible and then thought it would close the form.....
It works at making the hidden form visible........BUT.......
I can't get it to close the original form??????
Private Sub cmdSaveCtlTotals_Click()
dblCtlTtlAmtIn = Me.txtCtlAmtIn
dblCtlTtlAmtOut = Me.txtCtlAmtOut
dblCtlTtlNetAmt = Me.txtCtlNetAmt
dblCtlTtlAmtVal = Me.txtCtlAmtVal
If CurrentProject.AllForms("frm_ClearChipSelectMachines").IsLoaded Then
Forms!frm_ClearChipSelectMachines.Visible = True
End If
If CurrentProject.AllForms("frm_ShiftReportingLVL").IsLoaded Then
DoCmd.Close , "frm_LVLReportingControlTotals"
Forms!frm_ShiftReportingLVL.Visible = True
End If
' DoCmd.Close , "frm_LVLReportingControlTotals"
End Sub
As you can tell it's the
DoCmd.Close , "frm_LVLReportingControlTo
I've tried it without quotations, I've tried it without quotations and Forms!.....
It unhides the frm_ShiftReportingLVL alright but puts the form I'm trying to close in the background behind the Form made visible and just leaves it open.........
Where am I messing up????????
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Good Grief.........
Open in new window