S
steamngn via AccessMonster.com
Oh, the joys of programming...
I have a check in form I am developing, and i am having an issue with a
nested subform not behaving properly. The setup:
Main form is bound to table DateInfo, which has datetime column for each day
of year. In this form are two subforms, sfmATTHDR and sfmDailySched.
sfmDailySched is a continuous form linked to DateInfo by date, and shows all
of the classes scheduled for the current date. sfmATTHDR is a single form
also linked to DatInfo by date, and displays the current class available for
check in. sfmATTHDR is filtered by time in order to show only the current
running class. DateInfo refreshes using OnTimer every 15 seconds; This allows
the daily schedule to show how long before a class starts, if it is already
in progress or already completed. It also allows sfmATTHDR to allow check in
20 minutes before a class starts to 5 minutes after. All of this works just
as planned without issue. The problem comes in when I try to add a subform to
sfmATTHDR in order to allow students to check in. This subform will be bound
to table ATTENDANCE, and linked to sfmATTHDR on field ATT_HDR_ID. What
happens is that when the OnTimer fires, the subforms refresh and the
attendance subform goes to the first record (expected). I have tried every
acCommand New Record/Go to new combination I can think of, but the result is
always the same. The form goes to the first record for a split second, then
jumps to the new record (where we want it) and then jumps RIGHT BACK TO THE
FIRST RECORD! If I hit the enter key it then goes to the new record again.
Can anyone help as to why it may do this? When data is entered into the
ATTENDANCE subform and the enter key is pressed, i do some basic validation
(using dlookup) and then pop up a small form to tell the user they have been
signed in or to notify them of a problem (duplicate entry, unknown Id, etc).
This works fine. I can't see any code that would cause my problem, but I am
sure there is something silly I am doing wrong..
TIA for any help!
Andy
I have a check in form I am developing, and i am having an issue with a
nested subform not behaving properly. The setup:
Main form is bound to table DateInfo, which has datetime column for each day
of year. In this form are two subforms, sfmATTHDR and sfmDailySched.
sfmDailySched is a continuous form linked to DateInfo by date, and shows all
of the classes scheduled for the current date. sfmATTHDR is a single form
also linked to DatInfo by date, and displays the current class available for
check in. sfmATTHDR is filtered by time in order to show only the current
running class. DateInfo refreshes using OnTimer every 15 seconds; This allows
the daily schedule to show how long before a class starts, if it is already
in progress or already completed. It also allows sfmATTHDR to allow check in
20 minutes before a class starts to 5 minutes after. All of this works just
as planned without issue. The problem comes in when I try to add a subform to
sfmATTHDR in order to allow students to check in. This subform will be bound
to table ATTENDANCE, and linked to sfmATTHDR on field ATT_HDR_ID. What
happens is that when the OnTimer fires, the subforms refresh and the
attendance subform goes to the first record (expected). I have tried every
acCommand New Record/Go to new combination I can think of, but the result is
always the same. The form goes to the first record for a split second, then
jumps to the new record (where we want it) and then jumps RIGHT BACK TO THE
FIRST RECORD! If I hit the enter key it then goes to the new record again.
Can anyone help as to why it may do this? When data is entered into the
ATTENDANCE subform and the enter key is pressed, i do some basic validation
(using dlookup) and then pop up a small form to tell the user they have been
signed in or to notify them of a problem (duplicate entry, unknown Id, etc).
This works fine. I can't see any code that would cause my problem, but I am
sure there is something silly I am doing wrong..
TIA for any help!
Andy