Rabu, 01 Januari 2014

Re: [MS_AccessPros] Issue with closing form

 

Rod-


I should have asked:

Do you have any code in the Open or Load events of frmDuplicateLicense.  Also, is there any code in the Close or Unload events of either form?

There should be no timing problem.  You asked for frmDuplicateLicense to be opened before this code finished (even though you have already started a close of the current form), so it should stay open unless something else is closing it or causing it to error out.

Please include the entire thread in your reply.  I had to go hunting on the website to refresh my memory about your original question and my response.

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 31, 2013, at 3:45 PM, desertscroller@cox.net wrote:

Good Morning John,  I tried the command with the same results.  It appears to be a timing issue.  When I set a break point and step through the commands one at a time everything works fine.  I have tried changing the order of the two form commands with the same results.  Stepping through the code works but real time both forms close.

There is no code in the LOAD or OPEN events of SySMaint.  SysMaint consist of multiple command buttons to initiate different forms to allow for configuring Combo Box list used throughout the total application.  The one associated with Duplicate Record View contains the following:

Dim rptFilter As Variant
On Error GoTo DuplicateRecordsErrorHandler
  rptFilter = ""
  'rptFilter = "(lngUserID = " & GetLoggedUser() & ")"
  DoCmd.Close acForm, "frmSysMaint", acSaveNo
  DoCmd.OpenForm "frmDuplicateLicense", acNormal, "", rptFilter
DuplicateRecords_Exit:
  Exit Sub
DuplicateRecordsErrorHandler:
   MsgBox Err.Description, vbCritical
   Call LogError(Err.Number, Err.Description, "frmSysMaint-Cmd_DuplicateRecords_Click()")
   Resume DuplicateRecords_Exit

Currently rptFilter is not be used.

 

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

__,_._,___

Tidak ada komentar:

Posting Komentar