Hayvek
Difficult to say where you should put the code as I don't know what you're trying to do. Hopefully this example will help. I created a form which has table "Random tbl" as recordsource. The table contains integer field "RandomNo" which is the controlsource for text box "txtRandomNo"...