A little help please - form headers

E

eloy

I have a database of student names viewed as continuous forms. A series of
yes/no fields are used to check whether student is absent or tardy for each
day of the six week period. I am not a programmer and I cannot figure out
how to have user-input fields (dates) in the header section and be able to
navigate my records without losing the info. A little help, please?
Thanks
Eloy
 
M

mattc66 via AccessMonster.com

So does your student table have a Date Field if Tardy and a Date Field if
Absent? When the user checks a yes no at the top of the form you want it to
place a date in the students record? Do I understand you correct?
Matt
 
D

DStegon via AccessMonster.com

i am with mattc here... dont quite get what you are trying do have done.
So does your student table have a Date Field if Tardy and a Date Field if
Absent? When the user checks a yes no at the top of the form you want it to
place a date in the students record? Do I understand you correct?
Matt
I have a database of student names viewed as continuous forms. A series of
yes/no fields are used to check whether student is absent or tardy for each
[quoted text clipped - 3 lines]
Thanks
Eloy
 
E

eloy reyna

thnks DS.
My record consists of several yes/no fields along with the student name.
Each yes/no represents a tardy and an absence for each date. I have about
20 sets of yes/no fields and I need date for each set. It would be ideal if
I could have a user-input field in the form header section and have that
date apply to all records so that I could navigate the records and not lose
the date as I view the records in a continuous form. I hope this clears it
up a little. I've never been able to express myself very well. Thanks again.

eloy

url:http://www.ureader.com/msg/105323678.aspx
 
M

mattc66 via AccessMonster.com

I will make a suggestion that you have 2 tables with the following fields:

tblStudents
StudentID
StudentName - Text

tblAttendance
AttendID
StudentID
Tardy - Date/Time
Absent - Date/Time

Have two forms - a main form based on the Student and Subform based on the
Attendance. You'd join the two forms with the StudentID.

Then add two buttons One called Tardy and the other called Absent and place
them on the main form.

Under the Click Event for each button do as follows:

ButtonName: btnTardy:

Private Sub btnTardy_Click()
'This will add todays date and time to the ref field.
Forms!MainFormName!SubFormName!Tardy = Now()
End Sub

ButtonName: btnAbsent_Click()
'This will add todays date and time to the ref field.
Forms!MainFormName!SubFormName!Absent = Now()
End Sub
 
D

DStegon via AccessMonster.com

agree with Mattc but i used to own a computer school and I know that
inputting attendance doesnot always happen on the date you are working. So,
use Mattc's example (nice suggestions) and add a date (if you good with
objects a calendar control would be nice) object, could be as simple as a
textbox that the users puts a date into. Put that control on the
MainFormName in the example below and instead of NOW() have it insert the
date of the control...

Thus
Forms!MainFormName!SubFormName!Absent = Now()
becomes
Forms!MainFormName!SubFormName!Absent = DateValue(me.MainFormName.DTControl)

This gives you the ability to insert the date you are working on and just
click through each person that is selected in mattc example.
I will make a suggestion that you have 2 tables with the following fields:

tblStudents
StudentID
StudentName - Text

tblAttendance
AttendID
StudentID
Tardy - Date/Time
Absent - Date/Time

Have two forms - a main form based on the Student and Subform based on the
Attendance. You'd join the two forms with the StudentID.

Then add two buttons One called Tardy and the other called Absent and place
them on the main form.

Under the Click Event for each button do as follows:

ButtonName: btnTardy:

Private Sub btnTardy_Click()
'This will add todays date and time to the ref field.
Forms!MainFormName!SubFormName!Tardy = Now()
End Sub

ButtonName: btnAbsent_Click()
'This will add todays date and time to the ref field.
Forms!MainFormName!SubFormName!Absent = Now()
End Sub
thnks DS.
My record consists of several yes/no fields along with the student name.
[quoted text clipped - 8 lines]
 
E

eloy

thanks for your response.

My record consists of student name, id and serveral "pairs" of yes/no
fields. Each pair of yes/no fields represents an absence or a tardy. Each
pair is centered below a user-input variable (the date) in the header
section. It would be ideal if the user would then enter a date (in the
header) and click on either absent or tardy for each record as viewed in
continuous form. I hope i made it a little clearer. thanks again for your
help.
Eloy
DStegon via AccessMonster.com said:
i am with mattc here... dont quite get what you are trying do have done.
So does your student table have a Date Field if Tardy and a Date Field if
Absent? When the user checks a yes no at the top of the form you want it to
place a date in the students record? Do I understand you correct?
Matt
I have a database of student names viewed as continuous forms. A series of
yes/no fields are used to check whether student is absent or tardy for each
[quoted text clipped - 3 lines]
Thanks
Eloy
 

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