R
RFrechette
I have a form called "frm_Credits". I have an option group called
"Frame_Credit". Within this group are 4 options. They populate the "Credit"
field. I also have a field called "Units". What I need to do is go through
a series of scenarios that could occur and perform an action for each one.
This is what I have for code and I put it after updating the "Units" field
and also after updating the Option Group. After updating either one of these
fields, nothing happens.
If I take out the "And Credit...", it works for the "Units" value.
I tried using a Case statement and apparently didn't get the syntax correct.
Any help would be so much appreciated.
If Units < 0 And Credit = 1 Then 'It's a credit and amount is
negative
Units = Units
ElseIf Units > 0 And Credit = 1 Then 'It's a credit and amount is
positive
Units = Units * -1
ElseIf Units < 0 And Credit = 2 Then 'It's a credit and amount is
negative
Units = Units
ElseIf Units > 0 And Credit = 2 Then 'It's a credit and amount is
positive
Units = Units * -1
ElseIf Units < 0 And Credit = 3 Then 'It's a rebill and amount is
negative
Units = Units
ElseIf Units > 0 And Credit = 3 Then 'It's a rebill and amount is
positive
Units = Units * -1
ElseIf Units < 0 And Credit = 4 Then 'It's a rebill and amount is
negative
Units = Units
ElseIf Units > 0 And Credit = 4 Then 'It's a rebill and amount is
positive
Units = Units * -1
End If
Thanks,
Rachel
"Frame_Credit". Within this group are 4 options. They populate the "Credit"
field. I also have a field called "Units". What I need to do is go through
a series of scenarios that could occur and perform an action for each one.
This is what I have for code and I put it after updating the "Units" field
and also after updating the Option Group. After updating either one of these
fields, nothing happens.
If I take out the "And Credit...", it works for the "Units" value.
I tried using a Case statement and apparently didn't get the syntax correct.
Any help would be so much appreciated.
If Units < 0 And Credit = 1 Then 'It's a credit and amount is
negative
Units = Units
ElseIf Units > 0 And Credit = 1 Then 'It's a credit and amount is
positive
Units = Units * -1
ElseIf Units < 0 And Credit = 2 Then 'It's a credit and amount is
negative
Units = Units
ElseIf Units > 0 And Credit = 2 Then 'It's a credit and amount is
positive
Units = Units * -1
ElseIf Units < 0 And Credit = 3 Then 'It's a rebill and amount is
negative
Units = Units
ElseIf Units > 0 And Credit = 3 Then 'It's a rebill and amount is
positive
Units = Units * -1
ElseIf Units < 0 And Credit = 4 Then 'It's a rebill and amount is
negative
Units = Units
ElseIf Units > 0 And Credit = 4 Then 'It's a rebill and amount is
positive
Units = Units * -1
End If
Thanks,
Rachel