Senin, 30 Desember 2013

Re: [MS_AccessPros] Issue with closing form

 

Rod-


Do you have any code in the Open or Load events of frmSysMaint?  I assume this code is running in frmDuplicateLicense.  When I want to close the form where the code is running, I use:

DoCmd.Close acForm, Me.Name

That makes it clear that I'm closing the form where the code is running.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Dec 30, 2013, at 10:59 PM, <desertscroller@cox.net> <desertscroller@cox.net> wrote:

Hi All - Happy New Year
I am having an issue with closing a form.  The following code works great in all other uses but does work the same here.

On Error GoTo Form_Close_Err
    DoCmd.OpenForm "frmSysMaint", acNormal, "", "", , acNormal
    On Error Resume Next
    DoCmd.Close acForm, "frmDuplicateLicense"
    Exit Sub
Form_Close_Exit:
    Exit Sub
Form_Close_Err:
    MsgBox Error$
    Resume Form_Close_Exit

The SysMaint form launches just fine but when the close form command is used to close the current form -- both forms close.  I have tried close the DuplicateLicense form first then open SysMaint but get same results.
Any suggestions.   Access 2010 on a Windows 8.1 computer.
Rod

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar