Change Default value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sillyr
    New Member
    • Oct 2007
    • 37

    Change Default value

    Hi- I'm using Access 2007. I wanted to change a default value for a field that previously had no default value. I though it would be easy- just set the default value setting to the number t hat I would like. There was originally no default value and now I would like t he default value to be 12. The data type is number, long integer. The field display control is a combo box, the row source type is Table/Query and the row source is another table that on the form is a drop down box where the user selects a value. I have other fields that have the same formatting that have default values that I can change that work. These fields were given default values when I created the table. I also tried to change the default value on the form, but have had no luck. Thanks for any help
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    So, just to restate; you've tried opening the table in Design View and add the Default and you've tried adding the Default in the form Design View thru the Properties sheet? And when you add a new record there is no Default?

    First off, you do know that the new Default will only affect new records, right? Old records with no value won't have the Default entered.

    Ther are reports of other Properties not being retained in Access 2007 unless you enter them, click on another property, then exit. I've seen no report of this happening with Default Values, but it might be worth trying.

    Linq ;0)>

    Comment

    • sillyr
      New Member
      • Oct 2007
      • 37

      #3
      Yes- what you said is correct sorry I didnt state that, but I did do everything in the design view for both the table and the form. When I enter a new record the default value is not present. With the other fields that I entered a default value when I created the table and subsequent form the default values are present for all records in the table and also always present on the form. The one field where the default value is changed on a regular basis has no errors when the default value is changed. The new default value is present when you view the table in the datasheet view even when no new data has been entered.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32653

        #4
        Originally posted by sillyr
        When I enter a new record the default value is not present.
        In what case is this Sally?
        On a form or in datasheet view of the table itself?

        Comment

        • sillyr
          New Member
          • Oct 2007
          • 37

          #5
          Hi- It was not working on either the table or the form, but I did some online searching and figured out a way to fix it. On the property sheet of the form in the default value I put [cmbdiscard818].[ItemData](5). Thanks

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32653

            #6
            Cool - and thanks for posting your answer.

            I agree that setting the default of the control is better than changing the table design in cases such as this.

            Comment

            Working...