logical .....
where the else if len not=11????
If Len(RA) = 11 Then
DoEvents
RSS.Seek "=", RA
If RSS.NoMatch Then
SETT = ""
NDG_TIT = ""
CHECK_SETT = False
Else
If Not IsNull(RSS.Fields(0).Value) Then
If Not IsNull(RSS.Fields(7).Value) Then
SETT = RSS.Fields(7).Value
End If
NDG_TIT = RSS.Fields(0).Value
CHECK_SETT = True
End If
End If
End If
where the else if not len=11
-
- Administrator
- Posts: 78549
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: where the else if not len=11
If you indent the code systematically, it is easier to see which End If corresponds to which If.
In the code below, I have applied consistent indentation, and added comments that show what each End If belongs to.
In the code below, I have applied consistent indentation, and added comments that show what each End If belongs to.
Code: Select all
If Len(RA) = 11 Then
DoEvents
RSS.Seek "=", RA
If RSS.NoMatch Then
SETT = ""
NDG_TIT = ""
CHECK_SETT = False
Else
If Not IsNull(RSS.Fields(0).Value) Then
If Not IsNull(RSS.Fields(7).Value) Then
SETT = RSS.Fields(7).Value
End If ' Not IsNull(RSS.Fields(7).Value)
NDG_TIT = RSS.Fields(0).Value
CHECK_SETT = True
End If ' Not IsNull(RSS.Fields(0).Value)
End If ' RSS.NoMatch
Else
' Code for if Len(RA) <> 11 goes here
' ...
End If ' Len(RA) = 11
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4364
- Joined: 26 Apr 2010, 17:36
Re: where the else if not len=11
tks for patienceHansV wrote:If you indent the code systematically, it is easier to see which End If corresponds to which If.
In the code below, I have applied consistent indentation, and added comments that show what each End If belongs to.
Code: Select all
If Len(RA) = 11 Then DoEvents RSS.Seek "=", RA If RSS.NoMatch Then SETT = "" NDG_TIT = "" CHECK_SETT = False Else If Not IsNull(RSS.Fields(0).Value) Then If Not IsNull(RSS.Fields(7).Value) Then SETT = RSS.Fields(7).Value End If ' Not IsNull(RSS.Fields(7).Value) NDG_TIT = RSS.Fields(0).Value CHECK_SETT = True End If ' Not IsNull(RSS.Fields(0).Value) End If ' RSS.NoMatch Else ' Code for if Len(RA) <> 11 goes here ' ... End If ' Len(RA) = 11
but... on old my pc i can install a little tool nemad Smart Indender from OLD, now on the new pc i dont have the Admin oermissioni and i cannot install anothing!!!
exists a free tool to indent the cdoe withiut install it?
Tks as usual.
-
- Administrator
- Posts: 78549
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: where the else if not len=11
I don't know of any code indent add-ins that don't need to be installed. Sorry!
Best wishes,
Hans
Hans