Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-30-2020, 09:36 AM
koalaguinness koalaguinness is offline Use Drop down to populate other categories Windows 10 Use Drop down to populate other categories Office 2016
Novice
Use Drop down to populate other categories
 
Join Date: Apr 2020
Posts: 3
koalaguinness is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 04-30-2020, 02:02 PM
macropod's Avatar
macropod macropod is online now Use Drop down to populate other categories Windows 7 64bit Use Drop down to populate other categories Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 04-30-2020, 02:43 PM
Charles Kenyon Charles Kenyon is offline Use Drop down to populate other categories Windows 10 Use Drop down to populate other categories Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,081
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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.
Reply With Quote
  #4  
Old 04-30-2020, 03:57 PM
Guessed's Avatar
Guessed Guessed is offline Use Drop down to populate other categories Windows 10 Use Drop down to populate other categories Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #5  
Old 04-30-2020, 04:16 PM
macropod's Avatar
macropod macropod is online now Use Drop down to populate other categories Windows 7 64bit Use Drop down to populate other categories Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Charles Kenyon View Post
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.
Or one could use a FILLIN field in conjunction with a SKIPIF field. Such a field might be coded as:
{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]
Reply With Quote
  #6  
Old 05-01-2020, 08:48 AM
koalaguinness koalaguinness is offline Use Drop down to populate other categories Windows 10 Use Drop down to populate other categories Office 2016
Novice
Use Drop down to populate other categories
 
Join Date: Apr 2020
Posts: 3
koalaguinness is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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?
Yes, I can generate a Word or Excel list easily with the data required.
Reply With Quote
  #7  
Old 05-01-2020, 08:49 AM
koalaguinness koalaguinness is offline Use Drop down to populate other categories Windows 10 Use Drop down to populate other categories Office 2016
Novice
Use Drop down to populate other categories
 
Join Date: Apr 2020
Posts: 3
koalaguinness is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
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.
We are, in fact, a small school with only 50 pupils in total!
Reply With Quote
  #8  
Old 05-01-2020, 03:42 PM
macropod's Avatar
macropod macropod is online now Use Drop down to populate other categories Windows 7 64bit Use Drop down to populate other categories Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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.
Attached Files
File Type: docm Pupil Assessment.docm (46.5 KB, 6 views)
File Type: xlsx PupilData.xlsx (10.9 KB, 6 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


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
Use Drop down to populate other categories 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

Other Forums: Access Forums

All times are GMT -7. The time now is 06:07 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft