By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,647 Members | 1,433 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,647 IT Pros & Developers. It's quick & easy.

Help creating a Query / Listbox in MS Access

P: 4
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:


Attached Images
File Type: jpg Screenshot (1).jpg (41.5 KB, 148 views)
File Type: jpg Screenshot (2).jpg (32.8 KB, 152 views)
May 20 '18 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 1,221
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
May 20 '18 #2

PhilOfWalton
Expert 100+
P: 1,430
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
May 20 '18 #3

NeoPa
Expert Mod 15k+
P: 31,261
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.
May 21 '18 #4

Post your reply

Sign in to post your reply or Sign up for a free account.