Help creating a Query / Listbox in MS Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mrmrmister
    New Member
    • May 2018
    • 4

    Help creating a Query / Listbox in MS Access

    So I am using a Query to create a Listbox, which will show all of the 'Treatments' that have been selected corresponding to an 'AppointmentID' that is selected on the main form. I am using a query which has this criteria on the AppointmentID field: [Forms]![Manage Appointment]![AppointmentID]. This shows all the Treatments selected, but not the other Treatments that aren't selected.

    For example, if a new record or appointment is created, I can see no treatments.

    Here are a few pics:
    [IMGNOTHUMB]https://bytes.com/attachments/attachment/9451d1526808934/screenshot-1-.jpg[/IMGNOTHUMB]
    [IMGNOTHUMB]https://bytes.com/attachments/attachment/9452d1526808934/screenshot-2-.jpg[/IMGNOTHUMB]
    Attached Files
    Last edited by NeoPa; May 21 '18, 05:32 PM. Reason: Made pics viewable.
  • jimatqsi
    Moderator Top Contributor
    • Oct 2006
    • 1293

    #2
    Perhaps you should add some clarity to both your description and your images. I cannot tell much from either.

    But of course there are no treatments with the appointment ID if you create a new appointment. How could any treatments exist with that brand new appointment ID? You would have to add them somewhere before that query is going to find them.

    Jim

    Comment

    • PhilOfWalton
      Recognized Expert Top Contributor
      • Mar 2016
      • 1430

      #3
      jimatqui is quite right. Al istbox or Combobox only shows existing information. That is why on post https://bytes.com/topic/access/answe...istbox-subform
      I stated you needed a second subform to add the treatment information.

      Phil

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32662

        #4
        Originally posted by MrMrMister
        MrMrMister:
        For example, if a new record or appointment is created, I can see no treatments.
        Indeed. Exactly as one would expect.

        What I don't see, that I'd certainly expect, is any type of question. It's hard to provide answers when ther are no questions. Please pay more attention in future to posting questions where we don't need to keep coming back to you to find out what you want. Your time is too precious for that, and so is ours. How to ask "good" questions -- READ BEFORE SUBMITTING A QUESTION! may help you with that.

        Comment

        Working...