Get ListBox selection into a merger note



I have an access database for patients. In it I created a command button on
a form that when clicked, it collects data for the patient whose ID is on the
form and creates an automated merger to a word template to create "clinic
note" for that patient's visit. During a patient's visit, he/she may see
multiple poviders on the same day. I am interested in creating a list box on
the form from which we could select which providers saw the patient during
that day, and enlist these names in the patient's note. That is, the listbox
would have provider names (for instance provider A, Provider B, ,,,), and
then we could select the names of the providers that saw that patient during
that day, and put it in the note (I know how to put it at a bookmark or at a
Docproperty field). I do not care to bind the names of the providers who saw
that patient during that day to a field in a table, as all I want is just to
get these names for the clinic note of that day. I would be very grateful for
any help on the code to collect data from that listbox for the note.
Thanks a lot.




If you look in VBA Help for ItemsSelected, you will find a good example of
how to loop trhough the list of selected items in the list. Using that, you
should be able to assign the values to whatever you need.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question