V
veggiedi
Hi,
I'm having major difficulties getting what would conceptually seem
like a simple bit of programming, working!
I'm working with an Access form where, in real time, a researcher will
observing a session, noting if specific activities occur across 12
five-minute time periods. For each time period, (act1_t1, act_1t2,
act1_t3, etc) there is a check box where, if the activity occurs, the
check box will be checked; if the activity doesn't occur, the check
box will be left blank.
I have gotten some code working with a command button that will
calculate a running total on the number of check boxes checked in a
total field (act1_total) -- the big problem is, this total is not
stored in the table that the form is created from!
What I ultimately need is a field, for each activity, on each
individual record, that gives me the total number of boxes checked
from act1_t1 through act1_t12 (activity #1, time periods one through
tweleve) and then again for each subsequent activity and its time
periods on the record. I also need this total to be retained in the
data table so that the data can be exported and analyzed.
Thank you in advance for any help you may be able to offer!!
-diane
-- Here's the code I have that uses a command button to sum the total
number of boxes checked, but unfortunately doesn't retain that total
in the datatable:
Option Compare Database
Private Sub Command30_Click()
Dim RunningTotal As Double
RunningTotal = 0
If Me.focus_t1.Value = True Then
RunningTotal = RunningTotal + 1
End If
If Me.focus_t2.Value = True Then
RunningTotal = RunningTotal + 1
End If
If Me.focus_t3.Value = True Then
RunningTotal = RunningTotal + 1
End If
Me.focus_tot = RunningTotal
End Sub
Private Sub focus_tot_Click()
End Sub
I'm having major difficulties getting what would conceptually seem
like a simple bit of programming, working!
I'm working with an Access form where, in real time, a researcher will
observing a session, noting if specific activities occur across 12
five-minute time periods. For each time period, (act1_t1, act_1t2,
act1_t3, etc) there is a check box where, if the activity occurs, the
check box will be checked; if the activity doesn't occur, the check
box will be left blank.
I have gotten some code working with a command button that will
calculate a running total on the number of check boxes checked in a
total field (act1_total) -- the big problem is, this total is not
stored in the table that the form is created from!
What I ultimately need is a field, for each activity, on each
individual record, that gives me the total number of boxes checked
from act1_t1 through act1_t12 (activity #1, time periods one through
tweleve) and then again for each subsequent activity and its time
periods on the record. I also need this total to be retained in the
data table so that the data can be exported and analyzed.
Thank you in advance for any help you may be able to offer!!
-diane
-- Here's the code I have that uses a command button to sum the total
number of boxes checked, but unfortunately doesn't retain that total
in the datatable:
Option Compare Database
Private Sub Command30_Click()
Dim RunningTotal As Double
RunningTotal = 0
If Me.focus_t1.Value = True Then
RunningTotal = RunningTotal + 1
End If
If Me.focus_t2.Value = True Then
RunningTotal = RunningTotal + 1
End If
If Me.focus_t3.Value = True Then
RunningTotal = RunningTotal + 1
End If
Me.focus_tot = RunningTotal
End Sub
Private Sub focus_tot_Click()
End Sub