CreateTableDef is a DAO method, and by default Access 2002 only has a
reference to ADO.
With any code module open, select Tools | References from the menu bar,
scroll through the list of available references until you find the one for
Microsoft DAO 3.6 Object Library, and select it. If you're not going to be
using ADO, uncheck the reference to Microsoft ActiveX Data Objects 2.x
Library
If you have both references, you'll find that you may need to "disambiguate"
certain declarations, because objects with the same names exist in the 2
models. For example, to ensure that you get a DAO recordset, you'll need to
use Dim rsCurr as DAO.Recordset (to guarantee an ADO recordset, you'd use
Dim rsCurr As ADODB.Recordset)
The list of objects with the same names in the 2 models is Connection,
Error, Errors, Field, Fields, Parameter, Parameters, Property, Properties
and Recordset
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
"Ron" <(E-Mail Removed)> wrote in message
news:045501c37d5e$cbab39e0$(E-Mail Removed)...
> I believe I am making an easy error. Running Office XP,
> I want to create a table using the CreateTableDef
> method. Pretty much copied from the help section with a
> few modifications. However, it pops a message box
> with "Sub or Function Not defined". It also is not
> recognized as I cannot use the intelisense editor when I
> type it in. I can, however, do this on my home machine.
> Any suggestions? TIA,
> Ron