|
-
Apr 14th, 2004, 02:00 PM
#1
Thread Starter
New Member
Is there an easier way to code this??
Easier way of coding this??
If (Rec1.Fields("original_clock_number").Value Is System.DBNull.Value) Then
If (Rec1.Fields("new_clock_number").Value Is System.DBNull.Value) Then
KronosWebString = KronosWebString & "&_f88:=1"
Else
KronosWebString = KronosWebString & "&_f88:1=" & Rec1.Fields("new_clock_number").Value
End If
Else
If (Rec1.Fields("new_clock_number").Value Is System.DBNull.Value) Then
KronosWebString = KronosWebString & "&_f88:1="
Else
If Rec1.Fields("original_clock_number").Value = Rec1.Fields("new_clock_number").Value Then
KronosWebString = KronosWebString & "&_f88:1="
Else
KronosWebString = KronosWebString & "&_f88:1=" & Rec1.Fields("new_clock_number").Value
End If
End If
End If
-
Apr 14th, 2004, 03:44 PM
#2
Lively Member
that looks like what it has to be... sorry man!
-
Apr 14th, 2004, 07:21 PM
#3
Frenzied Member
It looks like
VB Code:
KronosWebString = KronosWebString & "&_f88:=1"
is the default, or most likely, condition. Why not set KronosWebString to that value, then test only for the couple alternatives?
BTW, it was nice of you to format your code as text, spaces and all, but when I went to quote the code, all kinds of text formatting codes showed up. If you're using more than a line or two of code, please use the code format tags. You dont't have to click the VB button in the vB code line of the forum. That doesn't work so well for blocks of code. If you preface your code with [vb_code] and end it with [/Highlight], it's a lot easier for people to read. Remove the underscore from vb_code. though, that's a posting issue.
Last edited by salvelinus; Apr 14th, 2004 at 07:28 PM.
-
Apr 14th, 2004, 10:47 PM
#4
Frenzied Member
it would be easier to read if you use {vbcode}{/vbcode} tags.
I probably would have opted for a Select Case block in this case. It pretties it up a little better
-
Apr 15th, 2004, 03:30 AM
#5
yay gay
Code:
KronosWebString = KronosWebString & "&_f88:1=" & Rec1.Fields("new_clock_number").Value
KronosWebString &= "&_f88:1=" & Rec1.Fields("new_clock_number").Value
\m/  \m/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|