Showing specific records on a form

W

weircolin

Hi There

I am working on a database and have records for different people on
it. I want to have a table that shows a list of events that have or
will take place that will be easily editable for the administrator.
However I would like it that on each person's record it would show the
list of events and a check box next to the events that they have
attended.

Is there any way this can be done? I'm not a very experienced user of
access.

Cheers

Colin
 
D

Dale Fye

Colin

Generally, this requires a third table (tbl_People_Events) which would
contain a field for the people and all of the events. You can do this one of
two ways:

1. You can create that table, and populate it with every combination of
people and events, and add a Yes/No field (which would show up as a checkbox
on your form)to indicate whether they attended that event. The down side of
this is every time you add a person, you have to add all of the events to the
table for that person, and every time you add an event, you have to add that
event for every person in you People table. When I do this, I generally
create a subform to display the events and the checkbox.

2. You can only store the People and the events they have attended. When I
use this method, I generally just display the list of events they have
attended in a listbox. Generally, when I use this method, I provide some
other method for the user to display the events that have not been attended,
so they can select from the list and add them for the user.
 
W

weircolin

Thanks for that, however I'm not sure if that is exactly what I am
looking for.

I would like it to basically show a subform type thing on the screen
of each person's file with the list of events. That wouldjust show
the list with a checkboxes next to them. Also, when a category is
added, I would like it if that meeting could then be added as a table
header on a main events table that would have all the people's names
and within that colum a check box.

Does that make any sence?

Colin
 
E

Evi

Colin, it doesn't make much sense. You talk about a Category (whatever you
mean by that). A category of what?
I suspect that you are mixing up proper Forms with subforms and those
Subdatasheets, so beloved of the Access templates which you can download
online. You have very little control with what happens when you are using
them - what you see is what you get.

What do you mean by a Table Header? What do you mean by 'each person's
file'?

Do you mean that you want a user to see only his name in the main form and
all available events in the subform?

If yes (and so long as you are using forms, rather than a tarted-up table),
then you can demand that a user types in his User Number (or whatever field
you have in your database to identify him) in the form that opens when the
database is opened. This form will open the real form, filtering this real
form so that only the user's data is shown.

You will need the structure which Dale suggested with TblPeopleEvents. This
table will need its own primary key, then PeopleId and EventID as Foreign
Key fields. In Table Design you will create a unique index for PeopleId and
EventID when combined (instructions available if needed) so that the same
event is never added more than once to the same person.

Since you want all people and events in your db, you will have an append
query containing the people table and the Event table, unlinked, to append
any missing combinations to your TblPeopleEvents (the index will prevent any
duplication)

I've pasted back the previous post with its reply in case anyone else can
figure out what you require

Evi
Thanks for that, however I'm not sure if that is exactly what I am
looking for.

I would like it to basically show a subform type thing on the screen
of each person's file with the list of events. That wouldjust show
the list with a checkboxes next to them. Also, when a category is
added, I would like it if that meeting could then be added as a table
header on a main events table that would have all the people's names
and within that colum a check box.

Does that make any sence?

Colin
Colin

Generally, this requires a third table (tbl_People_Events) which would
contain a field for the people and all of the events. You can do this one
of
two ways:

1. You can create that table, and populate it with every combination of
people and events, and add a Yes/No field (which would show up as a checkbox
on your form)to indicate whether they attended that event. The down side of
this is every time you add a person, you have to add all of the events to
the
table for that person, and every time you add an event, you have to add that
event for every person in you People table. When I do this, I generally
create a subform to display the events and the checkbox.

2. You can only store the People and the events they have attended. When I
use this method, I generally just display the list of events they have
attended in a listbox. Generally, when I use this method, I provide some
other method for the user to display the events that have not been attended,
so they can select from the list and add them for the user.
--
Don''t forget to rate the post if it was helpful!



Hi There

I am working on a database and have records for different people on
it. I want to have a table that shows a list of events that have or
will take place that will be easily editable for the administrator.
However I would like it that on each person's record it would show the
list of events and a check box next to the events that they have
attended.

Is there any way this can be done? I'm not a very experienced user of
access.

Cheers

Colin
 
W

weircolin

Hi there

Thanks for replying and sorry for being unclear. I know what I want
to do, but trying to explain it isn't the easiest!

Right. Basically I want something that would look like the following.

Event Attended (check box)
Meeting 1 Yes
Meeting 2 Yes
Meeting 3 No

And so on. This would have to be different for each person's file on
the database so it can be seen easily if they attended or not. I
think the way for me to show it on a form if through a sub form, but I
may be wrong.

The list of events shown above however would have to be able and
easily added to by the admin assistant.

I'm at a loss of where to go to get this to work or if it is even
possibly. If I've not explained it well enough I can try and make a
flow diagram and post it somewhere.

Cheers

Colin
 
E

Evi

Oh right!
You need:
TblEmployees (or people or whatever)
EmpID
EmpFirstName
EmpSurName
Other stuff just about the people and nothing about the meeting they will
attend.



TblMeeting
MeetID
MeetDate
MeetLocation etc
(other stuff only about the meeting itself and nothing about the people
attending it.

Done (a yes/no box for when the meeting has been finished with so that you
can filter it out but still have those records available when you need to
refer back to them

TblAttend
AttendID
MeetID (linked from TblMeeting
EmpID (linked from TblEmployee
Attended (Yes/NoCheck box)
Excuses (!)
other fields to do with Employees attending the Meeting

In this table, set up an Unique Index using the Index button in the Table
DesignView so that no person can be put down for the same meeting more than
once (ask if you're not sure how)

Create QryMeeting based on TblMeeting. In the Criteria row under Done put
False (so you aren't faced with past meetings).

Click on this closed Query and go to Insert, Form, Autoform Columnar to
create a Single Form.

Open it in Design View


Drag TblAttend from the database window and onto the form. The wizard should
suggest that you link by MeetID.




Create QryAttendee based on TblEmployee. Include in it EmpID and a field
which concatenates the first and second name eg

Fullname: EmpFirstName & " " & EmpSurName

Open your new subform by itself. Add a Combo Box to it. Choose QryAttendee
as the Source.
Choose EmpID and FullName as the fields for your combo (and any other fields
you may need to identify your employee)
Choose EmpID as the Unique Field
Choose to 'Store Its Value' in EmpID

You can now use this combo to add the attendees to the correct meeting. The
Admin can simply tick off the names as they do (or don't) attend, filling in
fields such as Excuses so that they can be laughed at incredulously
afterwards.

When the meeting is finished, you can tick the Done box on the main form so
that this meeting is no longer in the form although its records are easily
available for comparison or scoldings

Evi
 
W

weircolin

Hi There

Sorry for the delay in relying, I haven't looked at this for some
time. I am back on the case now. Thank you so much for taking the
time to reply and give me the instructions. I have followed them and
I THINK I have got what I should have by now. So am I right in
thinking the way this form will work is to open this on its own or can
I add it as a subform to my main form so when a person's record is on
the screen it will show what they have attended?

Also, when it is opened on it's own, is there anyway to get it to show
the persons name instead of ID on the table?

Thanks again

Colin
 

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