Use to nest statements that reference the same window or record data type object. An object reference that starts with a dot ( . ) is understood to refer to the window argument.
Use with to make your code easier to read.
Modifications of a record object within a with block do not persist outside the block, because the with statement works with a copy of the record object, rather than with the original record object.
with statements can be nested; however, you can only refer to the innermost window. For example, the following fragment:
with abc with .def .ghi
is equivalent to:
abc.def.ghi