Hi Stan,
Autonumbering is handled in 2 different ways.
a) the "classic" clarion way, Insert as form opens, then "update" when they press ok (or delete if they press Cancel). And
b) a "non fancy" way where the autonumbering is done right before the record is added (as they press ok).
The Web Server tries to use (b) because this makes for fewer problems if the user neither presses OK, nor Cancel. (which in a windows program is rare, but in a web program is really really easy.)
However he web server will use (a) when either;
i) there is a child browse on the form or
ii) you explicitly tell it to use (b). [ Advanced tab - "Prime Auto Inc" option]
But for you, there's a better solution.
Move your code to "PostInsert". That way the Autonumber will have been done for you, whichever approach it took.
Cheers
Bruce