Theory of the vertical Hall effect in a dimensionally quantized system