How to Fix Docmd.close Acform Not Working

Playing with the old VB form in MS Access, I have this weird error.

I have 2 forms: form1 and form2, when I am in form2 there is a close button there, and when I press that button which has a button click action:


DoCmd.Close acForm, form2.Name


The form is not closing.

Solution:
Just remove the parameters:

DoCmd.Close

Why? I'm honestly not sure. But maybe that function is unable to call the close event in the form?

0 Comments

Post a Comment

Post a Comment (0)

Previous Post Next Post
NERV Open Source

Building production Spring Boot systems?

Explore NERV — open-source Java libraries for audit trails, persistence, exception handling, and reliable event-driven architecture.

Explore NERV on GitHub →