Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2009
    Posts
    4

    Unanswered: displaying current date in data access page

    hi everybody,

    I have a text box on a data access page(which is linked to a table) in which i would like to display the current date.
    ive chanegd the field properties in the design view of the table-have set the default value of the field to Now().

    wats happening is when i run the data access page the the text box is empty.
    Only after saving the first record, when i click on new record, i see the current date displayed in the text box.

    please advice me what to do so that as soon as the data access page loads up teh current date is displayed in the text box

    please help.
    Thanks!

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Does the date need to be stored in a field or just displayed on the form?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    May 2009
    Posts
    21
    Set the initial value to =Date() on the Properties menu of the texbox. That is how I managed to do it for mine.

  4. #4
    Join Date
    Jun 2009
    Posts
    4
    i need to store it in a field in a table. i tried changing the default value of the textbox to date() but it always shows up when i add a record for the second time.

    when i page loads up.its always empty

  5. #5
    Join Date
    May 2009
    Posts
    21
    Quote Originally Posted by fatimaba
    i need to store it in a field in a table. i tried changing the default value of the textbox to date() but it always shows up when i add a record for the second time.

    when i page loads up.its always empty
    Did you give it a recordsource? You need to specify a spot in the table for it to be stored. I am guessing the textbox is unbounded right now correct?

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Must be a DAP curiosity?

    You've done the correct thing as far as Access forms are concerned -- setting the default value is all you need to do.

    I [thankfully] don't use DAP's so that about as much help as I can offer -- perhaps someone who has used DAP's might be able to shed some more light on the matter?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  7. #7
    Join Date
    Jun 2009
    Posts
    4
    well..i have already created a table with all the required fields including the date field (whose default value is set to date()). to create the DAP i simply dragged all the fields from the field list onto the page.
    so it is already bound.
    changing the default value of the textbox doesnt help either.!!

Posting Permissions

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