View Full Version : User-Derfined Data Types


mhanif
09-02-2009, 11:07 PM
Hi guys,
Can we create user-defined data types in Ms Access as the case with other databases. Such that If I change the data type, it should be reflected in all the database fields wherever it is used.

Waiting for the reply...
Hanif

gemma-the-husky
09-02-2009, 11:32 PM
you can have a user defined data structure (type declaration), to use in vba code - but not for use in a table

what are you thinking of doing?

mhanif
09-03-2009, 01:50 AM
Thanks for the reply...

I had many similar fields such as "Description" / "Created By" / "Account Number" which exist in many tables and should be of similar data type and length. Just to make the consistency and specially for future changes, I want to create user-defined data type.

Such custom data types are easier to maintain in multiple tables and specially they help if there is a change in future. So far I have not found such facility in MS Access.

Please share your thoughts...

Hanif

gemma-the-husky
09-03-2009, 02:10 AM
possibilites

1. you can manually copy and paste fields from 1 table to another
2. you could write a routine to add certain fields to all tables

if you mean you want to restrict the values you enter to specific ranges or values, then this would be done either by a validation rule, or by a lookup table.

I still dont quite understand what you mean by user-defined type