Results 1 to 4 of 4
  1. #1
    mhoctober is offline Novice
    Windows 98/ME Access 97
    Join Date
    Sep 2010
    Posts
    7

    Default Values On Forms - why does one impact another?

    Strange one this...



    On an order taking form I have two controls one based on a field OrderTakenDate and the other based on a field OrderDeliveryDate.

    I want to use the values from the control OrderTakenDate in queries to see when orders have been taken (date/time), however when I set its default value in the form to Now() ... to record the date/time the order was input... it works fine apart from the fact that this also forces any entry in the control OrderDeliveryDate to also hold a time value (as well as a date), and there are a number of reasons why I don't want this to happen.

    I dont see any connection between the two fields either at form, query (that the form is based on) or down at table design.

    Anyone any ideas or have seen anything like this before??

    Thanks

    Mike

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Not sure what you mean by "forces". How are you entering data there? A date/time field always holds a time value, though it could be zero. Date/time fields are stored as a Double, where the integer portion represents the date and the decimal portion represents the time.
    Last edited by pbaldy; 07-30-2011 at 09:11 PM. Reason: fix spelling
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    mhoctober is offline Novice
    Windows 98/ME Access 97
    Join Date
    Sep 2010
    Posts
    7
    Got it! Thanks...your reply made me think......the two controls are 'linked' in that the orderDeliveryDate is populated when the user clicks a button L to make its date 1 higher or E one date lower than the orderDate. So if the orderDate's value contains a time that is something other than zero the orderDliveryDate eill also.

    Thanks pbaldy. This has been nagging me for a while. Strange how its often so easy to miss the obvious!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Happy to help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Default Forms
    By BigCat in forum Forms
    Replies: 10
    Last Post: 06-09-2011, 03:36 PM
  2. Multiple default values in listbox
    By rickscr in forum Forms
    Replies: 3
    Last Post: 04-07-2011, 09:49 AM
  3. option group default values
    By wlumpkin in forum Access
    Replies: 6
    Last Post: 02-07-2011, 06:07 PM
  4. Setting default values in columns
    By crownedzero in forum Programming
    Replies: 0
    Last Post: 06-17-2009, 06:45 AM
  5. Default Values
    By twainscott in forum Programming
    Replies: 0
    Last Post: 09-14-2006, 11:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums