I'm not sure why the textbox is showing 0, but looking from your SQL Statement,"Select Max(OrderNumber) from OrderGenerate" ,would only return 1 row, the maximum(largest) OrderNumber.Then RS.RecordCount would only return 1, thus your textbox would always remain "2" Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
Get your facts first, and then you can distort them as much as you please Mark Twain