Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Oct 2002
    New Salem, North Dakota, USA
    Thanked 0 Times in 0 Posts

    Change Field size in a query (2000)

    When creating a make table query......Is it possible to change the field size property in the query?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Change Field size in a query (2000)

    No, field size is copied from the source fields. If you want the target fields to have a different size from the corresponding source fields, you must create an empty table with the desired field sizes first, and then use an append query instead of a make table query.
    You can either create the empty table manually, or use a definition query for this, or use DAO code.

    Definition queries have to be written in SQL, you can't display them in the query design grid. An example of the SQL for a definition query to create a table is

    CREATE TABLE tblNames (LastName TEXT (30), FirstName TEXT (20), BirthDate DATETIME, CONSTRAINT MyKey PRIMARY KEY (LastName, FirstName));

    This will create a table named tblNames with fields LastName, FirstName and BirthDate, and a primary key on the LastName/FirstName combination.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts