In Microsoft Access, you can set the data type for a field in table Design view, and you can set the data type for a parameter in the Query Parameters dialog box. These actions are equivalent to setting the DAO Type property for a Field object or a Parameter object by using Visual Basic.
The following table lists the DAO Type property constants and the corresponding Microsoft Access settings for field and parameter data types if you are setting them from table Design view or the Query Parameters dialog box.
When creating a table field with data type Number, set the FieldSize property to specify which of the six numeric data types the field will be. By default this property is set to Long Integer. The other settings are Byte, Integer, Single, Double, and ReplicationID.
Constant | Table field setting | Query parameter setting |
---|---|---|
dbBoolean | Yes/No | Yes/No |
dbByte | Number (FieldSize = Byte) |
Byte |
dbCurrency | Currency | Currency |
dbDate | Date/Time | Date/Time |
dbDouble | Number (FieldSize = Double) |
Double |
dbGUID | Number or AutoNumber (FieldSize = ReplicationID) |
Not supported |
dbInteger | Number (FieldSize = Integer) |
Integer |
dbLong | Number (FieldSize = Long Integer) |
Long Integer |
AutoNumber (FieldSize = Long Integer) |
Not supported | |
dbLongBinary | OLE Object | OLE Object |
Not supported | Binary | |
dbMemo | Memo | Memo |
dbSingle | Number (FieldSize = Single) |
Single |
dbText | Text | Text |
Not supported | Not supported | Value |
Note: The parameter data type Value doesn't correspond to a data type defined by the Microsoft Jet database engine. It corresponds to the SQL reserved word VALUE, which can be used to create a parameter query. In Microsoft Access or SQL queries, VALUE can be considered a valid synonym for the Visual Basic Variant data type.