Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Location
    Planet Earth
    Posts
    8

    Unanswered: Insert Current Time From Form To Table

    I have a form which has one edit box. I want to take current time in this field. This field is Primary Key. I am able to show the current time but the current time is not inserted in the table.

    So Please Help me.

  2. #2
    Join Date
    Apr 2003
    Location
    Santa Barbara, CA
    Posts
    67

    Re: Insert Current Time From Form To Table

    Originally posted by shebi
    I have a form which has one edit box. I want to take current time in this field. This field is Primary Key. I am able to show the current time but the current time is not inserted in the table.

    So Please Help me.
    I didn't know that an Access table will not accept the Now() function as a default value in a primary key field.

    Suggestions:

    1) Use a table ID as a primary key field (autonumber type) and Un-key the Current Time field.

    2) Change the primary keyed Current Time field to a Text field and format the function Now() to text. format(now(),"yyyy/mm/dd/ hh:mm")
    convert it back into a date use cdate([Current Time field]) on your form...

Posting Permissions

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