Hey can anyone help ... PLEASE

1) how do you attach a database and sql to vb?

2)how do you get vb to generate a number between a range for instance 1-200, but not use ones already inuse stored in an access database. But to generate these numbers cronologically. So 5 comes after 4 lol

I'll be VERY greatful to ANYONE who replies

Sajjad