|
-
Nov 11th, 2007, 06:34 PM
#1
Thread Starter
Junior Member
And or If Statement
I need to have the following code state "0A" or "0B" (zero A or zero B). Please see the specific lines in bold.
Any help will greatly be appreciated.
If bRetirementNo0 = False And sRetirementNo < "50000000" Then
If lReportcode = "010" Then
StrASCIIText = StrASCIIText & String(8 - Len(sRetirementNo), "0") & Trim(sRetirementNo)
ElseIf lReportcode = "020" Then
sRetirementNo = "0A" & Mid(sRetirementNo, 2) StrASCIIText = StrASCIIText & String(8 - Len(sRetirementNo), "0") & Trim(sRetirementNo)
End If
sSql = "INSERT INTO tl_PR_NYSRetirementReport "
sSql = sSql & "(fknCompany, fknEmployee, sName, sRetirementNumber, sSocialSecurityNumber, nTier, cGrossSalary )"
sSql = sSql & "SELECT DISTINCTROW "
sSql = sSql & "td_PREmployees.fknCompany, "
sSql = sSql & "AND ((td_PRCalculatedHistory.ynVoided)=False) "
sSql = sSql & "AND ((IIf(Not IsNull([sRetirementAccountNumber]) "
sSql = sSql & "And Left$([sRetirementAccountNumber],2)='0A',True,False))"
If Me!opgReportType = 1 Then
sSql = sSql & "=False)) "
Else
sSql = sSql & "=True)) "
End If
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
|