Auto populate a form

Jonathan Suthard

Registered User.
Local time
Today, 15:03
Joined
May 17, 2018
Messages
12
What is the best/easiest way to populate a form with a list of names that all have the same field in their record...

I have a combo that reflects a field on a table. I need to populate a form with names based on this combo box selection.
 
can you clarify your terminology - names of what?
 
Names of students stored in a table that has a specific field common to them such as...1st period
 
still unclear, you seem to be saying

populate a form with a list of names that all have the same name in their record..

perhaps provide an example of the data and the outcome required - at the moment it sounds like your example data is

John Smith
Harry Smith
Henry James
Harry Smith

and what you want is

Harry Smith
 
Usually a form doesn’t display multiple records of the same type.

If you want to display all the records (names) of a particular type it is best IMHO to use a listbox. Or use a subform.


Nick
Sent from my iPhone using Tapatalk
 
CJ,

I have a table with student names on it, this table contains several columns (fields) all with different data.

One of the columns contains the class period those students are in. I need to populate a form with all of the names from a specific class period.


ID Last First Class
123 Jones Sally 1st
112 Jones Bill 2nd
154 Koner Jayson 1st
145 Koner Jamie 2nd
157 Lavern Suzie 1st


I need to populate a form by selecting "1st" either from a combo box or a list box.

What I need is...
123 Jones Sally
154 Koner Jayson
157 Lavern Suzie

Hope this clarifies the situation
 
Create an unbound main form to hold the selection criteria and a bound subform in DS view to display the selection.

The RecordSource for the subform should be a query with a WHERE clause that references the combo on the main form.

Select ...
From ..
WHERE ClassID = Forms!yourformname!cboClassID

If there is only one criteria, then in the AfterUpdate event of the combo, requery the subform.

Me.Mysubformname.Requery

If there are multiple criteria, use a button to requery the subform.
 
Pat,

Thank you very much! I knew it could be done just didn't know how to do it. Not sure my knowledge level in Access will make this easy or not...more than likely not. However, I am going to give it a shot today!!!


Thanks again!
 

Users who are viewing this thread

Back
Top Bottom