Okay, I recognize that adoCn00.Open line.... :) Did you create your odbc dsn via the odbc manager, found under control panel or admin tools depending upon OS? When you created it, did you set its path property to the database you wanted to open? Did you add a refrence to ADO?
ADO = ActiveX Data Object(s)
No, you could use DAO or RDO if you wanted but M$ has tried to push programmers towards ADO as it wraps both DAO and RDO so that you have a common interface.
For that example, where you got that code from :) , I created the ODBC DSN (Open DataBase Connectivity Data Source Name) through the ODBC Data Source Administrator Dialog. How? Click on Add, select the appropriate driver you want to use and in this case for an Access 2k database I selected Microsoft Access Driver (*mdb). I gave it the name of test and then selected its path via the select button and I was done.
Then to set a reference to ADO, I used 2.8 (maybe 2.5?), you goto project references. When the dialog appears hit the M key to make it jump down to where the m's start. Scroll down to Microsoft ActiveX Data Objects 2.8, put a check in the box and hit ok. Now you are ready to use that example code of using ADO with an ODBC DSN defined.
However, you do not need to use an ODBC DSN as you can use a DSN Less connection string to connect via ado to any data source. For more on the different connection strings, see
http://www.connectionstrings.com .
Good Luck