Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ms access close form

Tags:

vba

ms-access

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

Is that totally crazy or is there a good reason to do this?

like image 987
Icode4food Avatar asked Dec 28 '22 09:12

Icode4food


1 Answers

Calling DoCmd.Close with no argument closes the active window. Using the Me.Name syntax accounts for scenarios where the form in question is not the active window (example running hidden). Personally I prefer the explicit version as it does exactly what you want, whereas the implicit version will probably do what you want.

like image 105
Oorang Avatar answered Jan 13 '23 22:01

Oorang