Custom List Box Columns in Microsoft Access. Dynamically Display Fields Based on User Selection.

Поделиться
HTML-код
  • Опубликовано: 14 окт 2024
  • In this Microsoft Access tutorial, I'm going to teach you how to select which fields are displayed in the columns of a list box based on the user selection.
    Annie from Pembroke Pines, Florida (a Platinum Member) asks: is there any way for the user to change the columns that are displayed on a form? Sometimes we want to see the customer's phone number. Other times we want to see their address. I don't want to make a giant form with everything on it, and I don't want to have to make lots of different forms. Can this be done?
    Silver Members and up get access to an Extended Cut of this video. Members will learn how to get rid of the check boxes. We will read the fields directly from the table properties, including which fields to display, the caption, field name, column width, and whether it should display on form load or not.
    MEMBERS VIDEO:
    • Custom List Box Column...
    BECOME A MEMBER:
    RUclips: / @599cd
    or My Site: 599cd.com/THMe...
    LEARN MORE:
    599cd.com/Cust...
    FOLLOWUP VIDEO:
    599cd.com/Even...
    LINKS:
    Relational Combo: 599cd.com/Rela...
    SQL With Access: 599cd.com/SQLw...
    Intro VBA: 599cd.com/VBA
    After Update: 599cd.com/Afte...
    SUGGESTED COURSE:
    Multi-Select List Boxes: 599cd.com/ACD15
    OTHER COURSES:
    FREE Access Beginner Level 1: 599cd.com/Free1
    $1 Access Level 2: 599cd.com/1Dollar
    FREE TEMPLATE DOWNLOADS:
    TechHelp Free Templates: 599cd.com/THFree
    Blank Template: 599cd.com/Blank
    Contact Management: 599cd.com/Cont...
    Order Entry & Invoicing: 599cd.com/Invo...
    More Access Templates: 599cd.com/Acce...
    ADDITIONAL RESOURCES:
    Donate to my Tip Jar: 599cd.com/TipJar
    Get on my Mailing List: 599cd.com/YTML
    Contact Me: 599cd.com/Contact
    TechHelp: 599cd.com/Tech...
    Consulting Help: 599cd.com/DevNet
    Twitter: / learningaccess
    en.wikipedia.o...
    products.offic...
    microsoft.com/...
    KEYWORDS:
    microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, user defined List Box Columns, Specify Columns, User Editable, Multiple Columns, Populating a MultiColumn ListBox, column widths, multi-select list box, read settings from table, Display only Selected Fields
    QUESTIONS:
    Please feel free to post your questions or comments below. Thanks.

Комментарии • 28

  • @renjithvijayakumar9022
    @renjithvijayakumar9022 2 года назад

    The way you are explaining to us is so much interested... Thank you for your classes 🙏

    • @599CD
      @599CD  2 года назад

      Thanks and welcome

  • @josecandidosorianavalon3339
    @josecandidosorianavalon3339 2 года назад

    Superb performance of using sql and controls properties... Thank you and congratulations.

    • @599CD
      @599CD  2 года назад

      Welcome. Glad you enjoyed.

  • @adelabdelhamid8272
    @adelabdelhamid8272 2 года назад

    Really , Unique idea , Unique illustrated lesson , thanks a lot , much respect from Egypt

    • @599CD
      @599CD  2 года назад

      Glad you liked it!

  • @hassanrozh6579
    @hassanrozh6579 2 года назад +3

    Great idea, thanks so much.

    • @599CD
      @599CD  2 года назад +2

      You are so welcome!

  • @peterl2616
    @peterl2616 2 года назад

    Richard, you are a beast. Love the tricks and shortcuts as always. You rock. Thank you.

    • @599CD
      @599CD  2 года назад

      BEAST MODE ACTIVE! :)

  • @achimmarliani2949
    @achimmarliani2949 2 года назад

    Hi Richard, just a short remark: as it comes to adding OnClick events to all the checkboxes you state that there is no easier way to do this. In fact there IS an other and sometimes easier way (and I assume you also know it). That is to in the event properties list add the line "=RequeryList()" to all the OnClick-events instead of adding multiple event handlers, one for each checkbox. But this requires the RequeryList function to be a public function, and I agree that this might be out of scope of even a intermediate level lesson. But all in all, I love to watch your videos, in each of them I find some gems I did'nt know oder understand correctly until.

    • @599CD
      @599CD  2 года назад

      You're mostly correct, Achim. That is definitely quicker than making a unique event handler for each checkbox. I say "mostly" correct because RequeryList doesn't need to be a PUBLIC function. It can still be a private function in that form's module. You do need to make it a function though, even though it doesn't have to return a value. But this would make a cool advanced trick to show people. Thanks for the reminder (I haven't used this technique myself in years). I'll put it in an upcoming Fast Tips video. Hmm... maybe tonight's. :) You are also correct that I try not to put TOO MUCH information in a single video. I don't want to blow peoples' brains. LOL.

    • @599CD
      @599CD  2 года назад

      Just made this the topic of tonight's video. Posting it now. Enjoy! :)

    • @achimmarliani2949
      @achimmarliani2949 2 года назад

      @@599CD :))) Thanks!

    • @jacksonmacd
      @jacksonmacd 2 года назад

      Along the same lines, it would be badly simpler to use a store the display width in the Tag property of each checkbox. Then use a constant record source and control each columns width using the value from the Tag property.

  • @DingusBatus
    @DingusBatus 3 месяца назад

    Instead of a bunch of IF statements could it be done with Select Case? Select Case Control.Name.
    It wouldn’t really shorten the code any, and I don’t know about performance difference, which would be faster, but it “might” look tidier? Certainly a bit more show off like?🤔😜

  • @tewwonwonii8462
    @tewwonwonii8462 2 года назад

    Excellent.

    • @599CD
      @599CD  2 года назад

      Many thanks!

  • @afrinsir7479
    @afrinsir7479 2 года назад

    awesome
    please make video on advance vba examples

    • @599CD
      @599CD  2 года назад

      I've got 37 levels of Developer classes: 599cd.com/Developer

  • @elijahhayes8833
    @elijahhayes8833 Год назад

    If one of the columns was a currency field, is there a way to format it in the list box?

  • @josemariaroman7057
    @josemariaroman7057 2 года назад

    Is it possible just to modify the ColumnWdth property with a 0 or non 0 value depending on the state of the corresponding checkbox? This way all columns are there, but you don't see all of them, and do not have to modify the RecordSource. Or would there be any unforeseen problem?

    • @599CD
      @599CD  2 года назад

      That would work as well. I don't foresee any problems.

  • @syedabbas201
    @syedabbas201 2 года назад

    Nice👍👍

    • @599CD
      @599CD  2 года назад

      Thanks

  • @afrinsir7479
    @afrinsir7479 Год назад

    is it possible in reports same as it ?

  • @abdulhamidalhaddadi2255
    @abdulhamidalhaddadi2255 2 года назад

    Great

    • @599CD
      @599CD  2 года назад

      Thanks