• compo box (2k)

    Author
    Topic
    #412867

    i hvae a tabl called tbl names contain 2 feald ( id and name )
    like
    id name
    10 – ashraf
    20-mohamed
    another forme called data there are a compobox calld named deponds on the names from tbl nams . i want to make name ashraf is a default in the name feald in data form .

    Viewing 0 reply threads
    Author
    Replies
    • #906439

      I assume that your combo box has:
      Row Source Type: Table/Query
      Row Source: the names table
      Bound Column: 1
      Column Count: 2
      Column Widths: 0″;1″ (or something similar with the first column width = 0)

      Although this combo box displays the name, it stores the corresponding ID. If you want to set a default value, you must supply the corresponding ID. So to set Ashraf as default, enter 10 (Ashraf’s ID) in the Default Value property of the combo box.

      • #906515

        yes . that is right , but if i want to change the default to other name i should to goto disign view to modifi it . i want to but the names in a form and the 1st name ( ashraf) is a default if i change ashraf’s name any time to mohamed , Mohamed is a default name .

        • #906568

          Why didn’t you ask that the first time? Set the Default Value property of your combo box to

          =[Named].[ItemData](0)

          where Named is the name of your combo box. The ItemData(0) refers to the first item in the list (counting starts at 0).

        • #906569

          Why didn’t you ask that the first time? Set the Default Value property of your combo box to

          =[Named].[ItemData](0)

          where Named is the name of your combo box. The ItemData(0) refers to the first item in the list (counting starts at 0).

      • #906516

        yes . that is right , but if i want to change the default to other name i should to goto disign view to modifi it . i want to but the names in a form and the 1st name ( ashraf) is a default if i change ashraf’s name any time to mohamed , Mohamed is a default name .

    Viewing 0 reply threads
    Reply To: compo box (2k)

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

    Your information: