Option Group Makinig it work?

G

Guest

Ned some help setting up the form. Have two tables:
1. Students Form and Demerits Form joined one to many
2. The demerit form is a subform with Date and I’ve placed the Option Group
box on the sub-form that has 3 buttons Present, Absent, Absent Unexcused.

When I press any of the choices I would like for the user to be unable to
duplicate the date of the attendance for the particular student. Say on
5/5/05 John Doe can be either Present, Absent or Absent Unexcused. Right now
I am able to enter records with the same date with different Option Group
choice causing duplicate date entry. Any help. Appreciate.
JPol
 
R

Rick Brandt

JPol said:
Ned some help setting up the form. Have two tables:
1. Students Form and Demerits Form joined one to many
2. The demerit form is a subform with Date and I've placed the Option
Group box on the sub-form that has 3 buttons Present, Absent, Absent
Unexcused.

When I press any of the choices I would like for the user to be
unable to duplicate the date of the attendance for the particular
student. Say on 5/5/05 John Doe can be either Present, Absent or
Absent Unexcused. Right now I am able to enter records with the same
date with different Option Group choice causing duplicate date
entry. Any help. Appreciate.
JPol

Your demerits table needs a unique index built on the StudentID field and the
date field combined (one index containing both fields). The option group
doesn't even enter into this.

With that index a student will only be able to have one entry per date.
 
R

Rick Brandt

JPol said:
Ok...Any idea how to do this. I am new to access. So please step by
step. Anyone?

Open the table in design view.

Select View - Indexes from menu

Enter...

IndexName FieldName1
FieldName2


Unique = Yes
 
G

Guest

Ok, Thanks this works nice, but I am getting an error message (complicated
for regulas Joe to understand) that needs to be simple like: “The Date
Already Exists. Chose Another Date or Find and Edit Already Existing Recordâ€

After pressing OK the new record that is being currently worked on, should
be deleted automatically to prevent further error messages in case editing
person doesn’t want to enter the new date, but needs to find existing one and
edit it, or just when he/she decides to exit out all together. Any way to do
this?
Thanks,
JPol
 

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