There is no cheat code to unlock upstairs access in The Sims (PS2). The ability to build and use a second floor is a core build-mode mechanic unlocked by game progression, not a cheat.
This applies to The Sims 1 (PS2), The Sims 2 (PS2), and The Sims Bustin' Out (PS2).