Solving the problem for you will not teach you anything.
Do you understand variables scope?
A variable live in a "world" and then dies. When you do a dim the object start to live, and somewhere it dies. The scope, means that the object is visible to some functions or not, or even part of the code.
google it. There is a lot of explain of it. You should leave the DAO driver, and check the scope.
Here you have the quick solve, change this two lines.
Call CreateContactTable (db)
Public Sub CreateContactTable(db as DAO.Database)
but please read something to understand why.
__________________
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the proof.
================================================== =========
|