R
robboll
Access 2003
I have a form with six paired checkboxes (for three events) A, B, and
C.
Event Start End
A --------- AS ----------- AE
B --------- BS ----------- BE
C --------- CS ----------- CE
And a Status textbox. The Status is either "Pending" or "Waiting"
When you open the form and all checkboxes are 0 the Status = "Pending"
If you check AS the Status changes to "Waiting" until AE is checked.
Then it changes back to "Pending"
The same thing applies to B and C.
My code below seems to work if you move from A to C, but moving up it
doesn't work.
Any time a Start is checked and and an End is unchecked, the Status
should be Waiting.
I think theres a much easier way to do this:
Function Stat()
'A ---------------
If Forms!frmStatus!ASD = -1 And Forms!frmStatus!AE = 0 Then
Forms!frmStatus!txtSTATUS = "Waiting"
End If
If Forms!frmStatus!ASD = -1 And Forms!frmStatus!AE = -1 Then
Forms!frmStatus!txtSTATUS = "Pending"
End If
'B ----------------
If Forms!frmStatus!BSD = -1 And Forms!frmStatus!BE = 0 Then
Forms!frmStatus!txtSTATUS = "Waiting"
End If
If Forms!frmStatus!BSD = -1 And Forms!frmStatus!BE = -1 Then
Forms!frmStatus!txtSTATUS = "Pending"
End If
'C -----------------
If Forms!frmStatus!CSD = -1 And Forms!frmStatus!CE = 0 Then
Forms!frmStatus!txtSTATUS = "Waiting"
End If
If Forms!frmStatus!CSD = -1 And Forms!frmStatus!CE = -1 Then
Forms!frmStatus!txtSTATUS = "Pending"
End If
End Function
Any help with this greatly appreciated!
RBollinger
I have a form with six paired checkboxes (for three events) A, B, and
C.
Event Start End
A --------- AS ----------- AE
B --------- BS ----------- BE
C --------- CS ----------- CE
And a Status textbox. The Status is either "Pending" or "Waiting"
When you open the form and all checkboxes are 0 the Status = "Pending"
If you check AS the Status changes to "Waiting" until AE is checked.
Then it changes back to "Pending"
The same thing applies to B and C.
My code below seems to work if you move from A to C, but moving up it
doesn't work.
Any time a Start is checked and and an End is unchecked, the Status
should be Waiting.
I think theres a much easier way to do this:
Function Stat()
'A ---------------
If Forms!frmStatus!ASD = -1 And Forms!frmStatus!AE = 0 Then
Forms!frmStatus!txtSTATUS = "Waiting"
End If
If Forms!frmStatus!ASD = -1 And Forms!frmStatus!AE = -1 Then
Forms!frmStatus!txtSTATUS = "Pending"
End If
'B ----------------
If Forms!frmStatus!BSD = -1 And Forms!frmStatus!BE = 0 Then
Forms!frmStatus!txtSTATUS = "Waiting"
End If
If Forms!frmStatus!BSD = -1 And Forms!frmStatus!BE = -1 Then
Forms!frmStatus!txtSTATUS = "Pending"
End If
'C -----------------
If Forms!frmStatus!CSD = -1 And Forms!frmStatus!CE = 0 Then
Forms!frmStatus!txtSTATUS = "Waiting"
End If
If Forms!frmStatus!CSD = -1 And Forms!frmStatus!CE = -1 Then
Forms!frmStatus!txtSTATUS = "Pending"
End If
End Function
Any help with this greatly appreciated!
RBollinger