so when the form loads, i want the next automatically generated id to appear in the textbox named CIDN.text(enabed=false). this was the code i tried out ::::
Expand|Select|Wrap|Line Numbers
- IdRs.Open "SELECT MAX(IDN) as NewId from expenses", DB, adOpenDynamic, adLockOptimistic
- NewId = NewId + 1
- CIDN.Text = NewId
Can anybody suggest me what the problem is and do tell me the mistake i have done and also the best way of doing such a thing.