Ms close

I know that it docmd.closewill close the current form, but for some reason I got in my head that I want to be more explicit. What I do is this docmd.close acForm, me.name.

Is this absolutely crazy or is there a good reason for this?

+3
source share
1 answer

Calling DoCmd.Close without an argument closes the active window. Using the Me.Name syntax takes into account scenarios in which the form in question is not an active window (the example works hidden). Personally, I prefer the explicit version because it does exactly what you want, while the implicit version is likely to do what you want.

+10
source

Source: https://habr.com/ru/post/1758064/


All Articles