Use arguments in Visual Basic

For example, the following Close method of the DoCmd object closes the Add Products form. It accepts two arguments, acForm and "Add Products":

DoCmd.Close acForm, "Add Products"

Because the Close method doesn't return a value, the arguments aren't enclosed in parentheses.

Tip

You can use the Object Browser to paste method or property syntax, including arguments, into your Microsoft Visual Basic code. The Object Browser pastes named arguments that you can specify in any order. You can use these named arguments, or you can replace the named arguments with standard arguments.