dayna
Registered User.
- Local time
- Today, 11:19
- Joined
- Nov 10, 2007
- Messages
- 39
I apologize for yet another thread on tracking student attendance, but I’ve been struggling with this data entry form for longer than I care to admit. What I’ve been able to piece together so far seems to work (under limited circumstances and with a lot of assuaging), but there are several flaws in the form that I can’t seem to solve. In addition to posting the relevant parts of my DB, I’ll try to explain what I’ve got:
First, I have an unbound form named Attendance with three fields:
[Select Class] (Combo box)
[Date] (textbox)
[Contact Hours] (DLookup from Classes table; will be invisible to users)
My subform is based on a query that displays the last and first names of active students who are enrolled in the selected class. I also have an additional unbound textbox in my subform for each student’s contact hours (or hours spent in the classroom on any given date). The default value of this textbox is set to the [Contact Hours] field in my main form.
My first problem is that when the Attendance form is first opened, #Error is displayed in the [Contact Hours] field of my subform. The strange thing is, when I switch to design view, and then back to form view, the subform works perfectly well. Yet, when I close the form and open it again, I get the familiar #Error until I change views.
Secondly, although the [Contact Hours] field on my main form updates beautifully when the [Select Class] combo is changed, the [Contact Hours] field in the subform does not refresh/requery. Again, it only works properly if I select a class, switch to design view, and then switch back to form view. All of the other fields requery just fine without switching views.
As if that weren’t enough, the [Contact Hours] field on my subform will not allow me to input a different value for each student. Even after I cajole my form into displaying the [Contact Hours] default value properly, once I change the contact hours for one student, that change cascades for every student in the class! Aggghhhh!
If we assume the impossible, i.e., that each student comes to class on time every day and accrues the same number of hours, my form appends these records to the attendance table quite nicely. The problem is that this never happens, and I’m tasked with tracking each student’s actual hours spent in the classroom, rounded to the nearest fifteen minutes.
I’ll spare you the litany of things I’ve tried and tutorials I’ve followed. I realize that there are probably some major problems with my approach, but this works better than anything else I’ve come up with over the course of the last month. Any ideas? Thanks so much!
First, I have an unbound form named Attendance with three fields:
[Select Class] (Combo box)
[Date] (textbox)
[Contact Hours] (DLookup from Classes table; will be invisible to users)
My subform is based on a query that displays the last and first names of active students who are enrolled in the selected class. I also have an additional unbound textbox in my subform for each student’s contact hours (or hours spent in the classroom on any given date). The default value of this textbox is set to the [Contact Hours] field in my main form.
My first problem is that when the Attendance form is first opened, #Error is displayed in the [Contact Hours] field of my subform. The strange thing is, when I switch to design view, and then back to form view, the subform works perfectly well. Yet, when I close the form and open it again, I get the familiar #Error until I change views.
Secondly, although the [Contact Hours] field on my main form updates beautifully when the [Select Class] combo is changed, the [Contact Hours] field in the subform does not refresh/requery. Again, it only works properly if I select a class, switch to design view, and then switch back to form view. All of the other fields requery just fine without switching views.
As if that weren’t enough, the [Contact Hours] field on my subform will not allow me to input a different value for each student. Even after I cajole my form into displaying the [Contact Hours] default value properly, once I change the contact hours for one student, that change cascades for every student in the class! Aggghhhh!
If we assume the impossible, i.e., that each student comes to class on time every day and accrues the same number of hours, my form appends these records to the attendance table quite nicely. The problem is that this never happens, and I’m tasked with tracking each student’s actual hours spent in the classroom, rounded to the nearest fifteen minutes.
I’ll spare you the litany of things I’ve tried and tutorials I’ve followed. I realize that there are probably some major problems with my approach, but this works better than anything else I’ve come up with over the course of the last month. Any ideas? Thanks so much!