Query Driving me mad

minii

Registered User.
Local time
Today, 19:55
Joined
Nov 8, 2010
Messages
26
So basically I've got a couple of tables setup like so: tblGroup: GroupID Group tblStudent: Student Number Usual stuff, firstname, lastname etc. tblGroupLink: StudentNumber GroupID Primary Group What I want to do is setup a form that has a list box containing the groups and then select one, pass that to a query and display the students contained within it. So I setup the form, named the list box as "grouplist". I then created a query with all the necessary fields and set the "Group" criteria as [Forms]![frmGroup].[grouplist] and when I go through the motions it just comes up with a box saying the above criteria and asking for a value. I know it's just me being dumb and missing something. Cheers.
 
Is grouplist single select or multiselect? If single select it should work if the bound column of the listbox is to the value that is the group (GroupID probably).

If multiselect you would need code to iterate through to get the values and set up the query.
 
This was something I was unaware of but I do only want it on single selection and it is set to this. With regards to the bound column - what should this be set to? It is set to 1, I've never used list boxes before so unsure of the properties that well. I'm hoping I can get it sorted coming back to it with a fresh head. Thanks for your reply. EDIT: Nevermind, fixed it. I said it was just me being dopey! I was closing the form and then opening the query as apposed to the other way around.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom