How to Make a Listbox in MS Access Part 1: Single-selection

Поділитися
Вставка
  • Опубліковано 22 жов 2024

КОМЕНТАРІ • 10

  • @seanmackenziedataengineering
    @seanmackenziedataengineering  3 роки тому

    What kind of project are you adding a listbox to?

    • @anhtung1364
      @anhtung1364 Рік тому +1

      I want a list box in continuous form and list box show value depend ID in continuous form. It like link marter fields in subform. Can you help me, please

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      @@anhtung1364 you can set the ControlSource of the list box to the field you like and it will show that value. Continuous forms can be difficult to show different values for Unbound list boxes. For example, you might select a value on one row, but then all rows in the continuous form will change to the value you selected. Only if you bind the control source of the list box to a field value will it then display different values on each row in a continuous form.

  • @udaboroma
    @udaboroma 3 роки тому +1

    Really great tip got out of this video was the number of column bounds if it is a multi column. Then set the individual column widths. Great tip.

  • @oscarcampos2086
    @oscarcampos2086 Рік тому +1

    I created a list box but it shows the lookup ID instead of the text. How can I change the list to show the text and not ID?

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      If your RowSource is Select ID, TextField From SomeTable, then you should have a ColumnCount of 2, BoundColumn of 1, and ColumnWidths of 0";1.5" for example. Right now you probably have either column count of 1 and column widths of 1" which shows the first column.

    • @oscarcampos2086
      @oscarcampos2086 Рік тому

      @@seanmackenziedataengineering sorry I should have been more specific. My table has a foreign key from a list of options. The list box is showing the foreign key instead of the text. For example, one column is rank. It’s showing a “1” instead of “E-1”.

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      @@oscarcampos2086 In that case, you need to open the Query design for RowSource, then make sure your table AND the foreign key table are there. Drag the foreign key onto the right key in your table (if it doesn't auto-join). Then Select the ID from your table and the description field from the table that your foreign key points to.

    • @oscarcampos2086
      @oscarcampos2086 Рік тому +1

      @@seanmackenziedataengineering beautiful! Thank you.