Re: Help with ALTER TABLE statement



Marsh, I don't use DDL much, so I'm not sure how to add a CONSTRAINT that
will index the field "Duplicates Ok." Is that a constraint?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Marshall Barton" <marshbarton@xxxxxxxxxx> wrote in message
news:7r64v1l52kor12mvrbspebv8l853kmdpk5@xxxxxxxxxx
Allen Browne wrote:

Replace:
Number
with:
LONG
to get the Long Integer size.

Required will default to No.

The field's Format property cannot be set with a DDL query statement. You
must use DAO code to set the Format of the Field in the TableDef. However,
since you only want General Number, and the Long cannot contain fractional
values anyway, this seems irrelevant (unless it was just an example.)

To set the Indexed property, execute another DDL query statement, using
CREATE INDEX.


Allen,
Is there a reason for using a Create Index query, instead of
a CONSTRAINT clause in the ALTER TABLE query.

Robert,
As for the Format property, I think it's irrelevant in any
situation. All it does is format the table's *** view,
which should never be displayed to users, so who cares what
it looks like.

--
Marsh
MVP [MS Access]


.


Loading