Specify arguments when you use a procedure, statement, or method in Visual Basic code

Specify arguments when you use a procedure, statement, or method in Visual Basic code

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 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. For more information on using the Object Browser, click . For more information on using named arguments, click .