|That's far t complicated a subject to answer in a forum like this. It would take to long and get too involved.|
There is plenty of information about this in the VB Help files and on the Internet. JUst Google it.
Come back if you get stuck but don't expect someone else to do all the work for you.