• How to set default value in combo box (Access 2002)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » How to set default value in combo box (Access 2002)

    Author
    Topic
    #394877

    Hello again everyone! I need to set the default value of a combo box which is in a form to None. The combo box is linked to a table and one of the values in the table is None. However when i try to enter in None into the default value box under form desgin (combo box data properties) it does not default to none.

    Thanks again.

    Viewing 1 reply thread
    Author
    Replies
    • #727352

      If you enter None in the default value property, does Access change it to “None” (including the quotes)?

      • #727360

        yes it does, however in the form itself it does not display it.

        • #727362

          Just to make sure: you must save and close the form, then open it. Just switching from design view to form view is not enough to get the default value.

          More questions:
          – Is the form bound? I.e. is the Record Source property of the form non-empty?
          – If so, is the combo box bound? I.e., is the Control Source of the combo box set to the name of a field in the Record Source of the form?

          • #727364

            I am not sure if the form is bound.

            The combo box is bound….

            • #727366

              I did try saving closing the form and opening again, no luck. The combo box’s are bound to fields type-type10 inside there are many values one of which is None which has a price of 0.00, every other one is a window blind size ie 102 x 66 and a price $.00 the price field is what i stored into the database for future use, could this be the problem?

            • #727368

              If the price field is the bound field, you should set the default value to a price; the combo box will automatically display the corresponding item.

            • #727372

              Hans, you have absolutely no idea you’ve helped me! THANK YOU SO MUCH! I have been working on this problem since noon. Its now 4:15, I am disgusted that it was such a simple problem. Thank you so much!

              Thank you!

            • #727373

              Hans, you have absolutely no idea you’ve helped me! THANK YOU SO MUCH! I have been working on this problem since noon. Its now 4:15, I am disgusted that it was such a simple problem. Thank you so much!

              Thank you!

            • #727369

              If the price field is the bound field, you should set the default value to a price; the combo box will automatically display the corresponding item.

            • #727367

              I did try saving closing the form and opening again, no luck. The combo box’s are bound to fields type-type10 inside there are many values one of which is None which has a price of 0.00, every other one is a window blind size ie 102 x 66 and a price $.00 the price field is what i stored into the database for future use, could this be the problem?

          • #727365

            I am not sure if the form is bound.

            The combo box is bound….

        • #727363

          Just to make sure: you must save and close the form, then open it. Just switching from design view to form view is not enough to get the default value.

          More questions:
          – Is the form bound? I.e. is the Record Source property of the form non-empty?
          – If so, is the combo box bound? I.e., is the Control Source of the combo box set to the name of a field in the Record Source of the form?

      • #727361

        yes it does, however in the form itself it does not display it.

    • #727353

      If you enter None in the default value property, does Access change it to “None” (including the quotes)?

    Viewing 1 reply thread
    Reply To: How to set default value in combo box (Access 2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: