Results 1 to 6 of 6

Thread: MS Access field type question

  1. #1

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Question MS Access field type question

    In MSAccess, when you add a new record to a table which has a DATE field, do you add the value as a date, or do you need to convert the date value to a long first ?

    I know when extracting from tables you need to convert the dates to longs to get your recordets, but is it the same rules when adding a record ?

  2. #2
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950
    Just add them as dates.

  3. #3

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818
    Thanks for the quick reply

  4. #4

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818
    OK thats that sorted out, but I have a primary key on this table defined as an AutoNumber, so should I omit this field in my "INSERT INTO ...." SQL statement ?


    I just realised .... I've stopped getting that damn annoying Sprinks pop-up !!

  5. #5
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950
    Yes, AutoNumber fields are generally used as Key fields and are automatically generated upon inserting a new record.

  6. #6

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818
    Thats what I thought.

    Thanks for your help vbGladiator

Posting Permissions

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



Click Here to Expand Forum to Full Width