Parent Coming Up a Few Times

G

Guest

Hello
i have a continuous form based on a query with a student table and parent
table. that gives me parents of students that were accepted to the college at
any time.

this is in order to write letters to the parents.

If a parent has 3 children that were accepted and 1 refused he comes up in
my list 3 times. In the form the user ticks and tick box on the side of which
parents he actually wants to send letters to.

i've tried a few times to make it that the parent should only come up once
on the list but each time i do that i cannot edit the fields and so the tick
box can't be ticked.

Is there any way of saying that of each parent id give it to me only once.
But with still being able to edit the tick box

thanks a lot
 
K

Keith Wilby

Database User said:
Hello
i have a continuous form based on a query with a student table and parent
table. that gives me parents of students that were accepted to the college
at
any time.

this is in order to write letters to the parents.

If a parent has 3 children that were accepted and 1 refused he comes up in
my list 3 times. In the form the user ticks and tick box on the side of
which
parents he actually wants to send letters to.

i've tried a few times to make it that the parent should only come up once
on the list but each time i do that i cannot edit the fields and so the
tick
box can't be ticked.

Is there any way of saying that of each parent id give it to me only once.
But with still being able to edit the tick box

thanks a lot

It sounds like your continuous form should actually be a single form with a
continuous subform because you have a 1:M relationship between parents and
children.

Keith.
www.keithwilby.com
 
G

Guest

i dont think so. because i dont to know who the children are i just need info
on the parents who have children accepted and i only want the parent to come
up once on the list so i can tick alongside them whether i want to send them
that specific letter or not. it makes no difference to me how many kids they
have in the college
thanks for your help
 
J

John Spencer

It can be done, but it depends on your table structure.

Assumptions:
Parents Table
Students Table (with ParentID reference to Parents Table and Accepted
field that is a Yes/No field)

You can use a query like the following.
SELECT Parents.*
FROM Parents
WHERE Exists (SELECT * FROM Students WHERE Student.ParentID =
Parents.ParentID AND Students.Accepted = True)

If you want to to do this in the query grid you need to enter the
following in a field "cell"
Exists(SELECT * FROM [Students] WHERE [Students].[ParentID] =
[Parents].[ParentID] AND [Students].[Accepted] = True)

And then enter True as the criteria under the above calculated field.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 

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

Top