Have to click "Close" button three times to close dialog form

M

Michael Fuchs

Hi everyone,

I got the following problem:

I'm opening a dialog (acDialog) form from my main form:

DoCmd.OpenForm "FrmEditTags", acNormal, , , , acDialog, ListKategorien.Value

The dialog form has got the following "Current" event:

Private Sub Form_Current()
If kategorien.ListCount > 0 Then
kategorien.Value = OpenArgs
Liste0.Requery
End If
End Sub

where kategorien is a Dropdown field and Liste0 is a listbox.

When I'm done with the changes in the dialog and I press the "Close"
button, which fires the following code:

Private Sub BtnClose_Click()
DoCmd.Close acForm, Me.Name, acSaveNo
End Sub

the dialog box comes back two more times and only closes after the third
click on the close button.

When tracing the code I found out that the "Current" event ist triggered
after the first two clicks on the "Close" button, but only after the
code coming directly after the OpenForm command in the main form has
been worked through.


Thanks for any help

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top