Re: Nested If problem
- From: "Baz" <bazz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 4 Jun 2007 16:16:43 +0100
Or maybe when an "Action" is required. Not clear to me whether Action is a
field, a control, a variable or what.
"Jeff Boyce" <nonsense@xxxxxxxxxxxx> wrote in message
news:OdTmlkrpHHA.3368@xxxxxxxxxxxxxxxxxxxxxxx
Carrie4
Have you tried inserting a Breakpoint at the start of the If...Then and
stepping through each command to check for values?
I'm not clear what you expect to have triggering this testing... and it
seems like you'd want to trigger it any time ANY of the fields changed.
Regards
Jeff Boyce
Microsoft Office/Access MVP
"Carrie" <Carrie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C7304533-A6F9-44CA-B4BC-DA3075A9AD58@xxxxxxxxxxxxxxxx
Hello Again, I have been back and forth on this one and finally gave up
on
the query idea and came back to trying a Nested If. There are basically
havefields that need to be evaluated in order to update Inspection_Frequency
but
I can't seem to get that to happen.
I have tried this on the GotFocus, BeforeUpdate and OnEnter events, I
doingalso tried it with and without the Me. Can anyone tell me what I am
wrong? Thanks a million!
Private Sub Inspection_Frequency_GotFocus()
If (Action = Suspend) Then
If (Me.Risk_Level = Low) And (Me.Risk_Type = 1) Then
Me.Inspection_Frequency = 5
ElseIf (Me.Risk_Level = Low) And (Me.Risk_Type = 2) Then
Me.Inspection_Frequency = 5
ElseIf (Me.Risk_Level = Low) And (Me.Risk_Type = 3) Then
Me.Inspection_Frequency = 5
ElseIf (Me.Risk_Level = Low) And (Me.Risk_Type = 4) Then
Me.Inspection_Frequency = 5
ElseIf (Me.Risk_Level = Low) And (Me.Risk_Type = 5) Then
Me.Inspection_Frequency = 1
ElseIf (Me.Risk_Level = Medium) And (Me.Downhole_Option = 1) Then
Me.Inspection_Frequency = 3
ElseIf (Me.Risk_Level = Medium) And (Me.Downhole_Option = 2) Then
Me.Inspection_Frequency = 5
ElseIf (Me.Risk_Level = Medium) And (Me.Downhole_Option = 3) Then
Me.Inspection_Frequency = 5
ElseIf (Me.Risk_Level = High) And (Me.Downhole_Option = 1) Then
Me.Inspection_Frequency = 1
ElseIf (Me.Risk_Level = High) And (Me.Downhole_Option = 2) Then
Me.Inspection_Frequency = 5
Else: Me.Inspection_Frequency = 0
End If
End If
End Sub
.
- References:
- Re: Nested If problem
- From: Jeff Boyce
- Re: Nested If problem
- Prev by Date: Re: Changing text to uppercase
- Next by Date: Re: error 2176
- Previous by thread: Re: Nested If problem
- Next by thread: Re: Nested If problem
- Index(es):
Relevant Pages
|
Loading