Results 1 to 11 of 11
  1. #1
    Star Lounger
    Join Date
    Mar 2002
    Location
    Edinburgh, Scotland
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Values Dropping (2000)

    Can anybody shed any light as to why a currency field with a default value set at 0 at table level and in the field's properties on a related form should "drop"? I have a database which sometimes reads this default and sometimes doesn't! Any help appreciated

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Default Values Dropping (2000)

    What do you mean by "drop"? And when you say "I have a database which sometimes reads this default and sometimes doesn't", it almost sounds like you are talking about another database.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Edmonton, Alberta, Canada
    Posts
    326
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default Values Dropping (2000)

    The only thing that comes to mind is that a default only works for new records. It doesn't have any effect on existing records, even if the field in question is blank.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Default Values Dropping (2000)

    Plus, if you append a Null to that field in a new record, you get a Null, not the default.
    Charlotte

  5. #5
    Star Lounger
    Join Date
    Mar 2002
    Location
    Edinburgh, Scotland
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default Values Dropping (2000)

    Dear Mark - I mean sometimes the default value is shown, ie

  6. #6
    Star Lounger
    Join Date
    Mar 2002
    Location
    Edinburgh, Scotland
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default Values Dropping (2000)

    That may be possible, Douglas - can you explain to me why that might be the case? Thanks

  7. #7
    Star Lounger
    Join Date
    Mar 2002
    Location
    Edinburgh, Scotland
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default Values Dropping (2000)

    Not sure if I know what you mean Charlotte - shouldn't all new records automatically take the default?

  8. #8
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Default Values Dropping (2000)

    If the DefaultValue in the table is 0, then new records should have a 0 in that field if created via an append query (or code) and if no specific field value is assigned. The DefaultValue of a form's control supersedes the table's DefaultValue when creating new records.

    I'd look at those records that show Null, and try to determine how they got added, and see if there is any consistency.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  9. #9
    Star Lounger
    Join Date
    Mar 2002
    Location
    Edinburgh, Scotland
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default Values Dropping (2000)

    Mark (et al), thank you very much - I have fixed this - new records are defaulting correctly, old records
    were added by an append - I have now updated, and all is running smoothly.

    What a way to spend a Saturday afternoon! Have a good one.

  10. #10
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Default Values Dropping (2000)

    If your query appends a Null to the field, then you will get a Null, not a default value. That is the in the nature of append queries and bites a lot of people who expect the default value to override it.
    Charlotte

  11. #11
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Default Values Dropping (2000)

    It sure beats mowing lawns !!
    <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>

Posting Permissions

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