#1
|
|||
|
|||
Use Drop down to populate other categories
Just registered today, have tried looking for solution but to no avail. Can anyone point me in direction of instructions: I want to select pupil's name from drop down list (which I was able to create) and by doing so, data relevant to that pupil would automatically populate theirClass/Teacher?Attendance. At the moment I have a separate drop-down menu for each category. Here is a screen shot of what I am doing, if it helps.
Pupil Reports.JPG |
#2
|
||||
|
||||
In order to do that, you would need to have a complete list of pupils and their teachers stored somewhere (e.g. a table in a Word document, an Excel worksheet, an Access database) for a macro attached to the dropdown to access. Do you have such a list?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Without a macro, but with a list such as Paul is describing, you could use MailMerge.
The dropdown in that instance would not be in the document but would be the "Find Recipient" dropdown in the Mailings Tab. |
#4
|
||||
|
||||
I would recommend you think a bit more about this. You are likely to run in to limits in how many list entries can sensibly go into a CC dropdown. If a primary school has 7 years/grade with 2-4 classes per year and 25ish kids per class then the list length of student names could easily be 700.
The flow would be better done by firstly selecting the class which would then allow a macro to lookup the teacher(s) name and populate the 25odd kids names into the first dropdown.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#5
|
||||
|
||||
Quote:
{SKIPIF{FILLIN "Student Name" \o }<> "{MERGEFIELD First_Name} {MERGEFIELD Last_Name}"} where 'First_Name' and Last_Name are the names of the fields holding the student names. Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. The indicated spaces in the field construction are all required.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
Yes, I can generate a Word or Excel list easily with the data required.
|
#7
|
|||
|
|||
Quote:
|
#8
|
||||
|
||||
Try the attached Word document and Excel workbook. Upon opening, the document looks for the an Excel workbook named 'PupilData.xlsx' in your documents folder - so that's where you should save the sample workbook for now. That workbook is assumed to have five columns (A-E) on 'Sheet1' for each pupil:
• given name • family name • class • teacher • attendance The workbook & worksheet names can both be changed in the macro that drives the process. As coded, the macro updates the document from the 'PupilData.xlsx' workbook each time it is opened. That, of course means any existing selections are wiped each time. Ideally, though, you'd create a template with the code and make a minor change to it so that it updates only when a new document for a given student is created. We can address that later. Have a play and see if it does what you want.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Populate grocery list from drop down menu | jlshanke | Excel | 3 | 08-21-2018 07:28 AM |
Auto Populate Text On Dependent Drop Down Exit | GregStewartPTC | Word VBA | 2 | 02-27-2017 05:37 AM |
Categories (2010) - how to edit drop down list for assignment to contact | NancyZ | Outlook | 0 | 07-10-2015 06:20 AM |
How to create a drop down list with sub categories | Gooford | Word | 0 | 06-18-2014 03:46 AM |
Populate a table based on choices from drop down menu | Xaand | Word VBA | 0 | 02-25-2014 11:08 AM |