what is the default data type for access

C

chrissy

Hi, i am trying to study for an exam and i cant seem to find these answers
anywhere, my text book only has projects and exercises. Can someone help me?
Thank you.
 
T

TedMi

That depends on where in Access. When creating columns in tables, the default
data type can be set via Tools/Options/Tables-Queries. Out of the box, it is
set to Text.

In VB programs, the default variable type is Variant. Programming tip: NEVER
allow a variable's type to default, always specify Option Explicit which
forces you to declare all variables prior to using them.
 
V

Van T. Dinh

If you get this question in the exam, tell the teacher who wrote the exam
paper to go outside the education environment and get some real-life
experience.

In a realistic database, you have many Tables, each Table can have a number
of Field and each Field has a different data type. Generally the Fields are
of different data type depending on your needs so the default data type,
IMHO, is of no use what so ever.

However, Access does let you set the default data type which is only used
when you design a Table using Table DesignView. Check the settings in Tools
/ Options ... / Tables & Queries tab / Table Design pane.
 
V

Van T. Dinh

However, "Option Explicit" only required the Variables to be declared, not
to specific types. Hence, even with Option Explicit, it is entirely
legitimate to declare:

Dim MySillyVariable

and the data type of MySillyVariable is Variant.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top