Using code to create a table

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: JR (anonymous_at_discussions.microsoft.com)
Date: 05/13/04


Date: Thu, 13 May 2004 09:11:07 -0700

I'm having a problem creating a table with a Number field that I want to be a type of double, but with a fixed format. It will be storing data such as the following:

.05
.15
.25
.35
...
...
1.95

Here's my code:
    With tdf
        .Fields.Append .CreateField("Gender", dbLong)
        .Fields.Append .CreateField("Age", dbLong)
        .Fields.Append .CreateField("Class", dbText, 5)
        .Fields.Append .CreateField("RRGroup", dbDouble)
        .Fields.Append .CreateField("Count", dbLong)
    End With
    CurrentDb.TableDefs.Append tdf
    

Thanks