查看: 1094|回复: 10
|
可以教导我用isNotNull吗?(MS SCCESS) 已经会辽 ^_^
[复制链接]
|
|
发表于 18-9-2006 05:08 PM
|
显示全部楼层
原帖由 程家伟 于 18-9-2006 04:34 PM 发表
如果我有三个TEXTBOX分别是 , 和 .....全部的TEXTBOX是数目。。那么是不是一下这样的作??
IF ISNotNULL(TEXT62) THEN
temphold2 =
END IF
IF ISNotNULL(TEXT70) THEN
temphold3 =
END IF
IF IS ...
你的问题真的很难,
我从来没有用过ISNotNULL -.-!!请问你用的access里有这吗?还是你自己写的function?
还是你可以直接用
IF trim(TEXT70)="" THEN
temphold3 =
END IF
还是你的function是
function ISNotNULL(string)
end function ????
还有不要用太多的IF啦。。难道你在每一个textbox都用IF来检查吗?
可以查考以下的,或用OOP的方法
http://chinese2.cari.com.my/myfo ... &extra=page%3D2
[ 本帖最后由 max5007 于 18-9-2006 05:09 PM 编辑 ] |
|
|
|
|
|
|
|
楼主 |
发表于 18-9-2006 05:36 PM
|
显示全部楼层
回复 #2 max5007 的帖子
我回去再研究研究如何的做做看,不行的话再来找找各位了 |
|
|
|
|
|
|
|
发表于 18-9-2006 05:40 PM
|
显示全部楼层
如果要直接一点的话就是这样咯
IF trim(TEXT70)="" THEN
temphold3 =
END IF |
|
|
|
|
|
|
|
发表于 18-9-2006 08:48 PM
|
显示全部楼层
SYNTAX 应该是 Not IsNull(TEXT62) |
|
|
|
|
|
|
|
楼主 |
发表于 19-9-2006 09:27 AM
|
显示全部楼层
|
|
|
|
|
|
|
楼主 |
发表于 19-9-2006 01:53 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 19-9-2006 02:50 PM
|
显示全部楼层
|
|
|
|
|
|
|
楼主 |
发表于 19-9-2006 04:30 PM
|
显示全部楼层
原帖由 max5007 于 19-9-2006 02:50 PM 发表
o..3年没有碰哦。。那一定忘记了。。oop=object oriented programming
trim是把string前后的空格去除
原来这样的用。。。
我现在还烦着如何的给visible 起来。。
If [Page] < [pages] Then
[rm] = ""
[Text91] = ""
[Text96] = ""
[Text97] = ""
[Text98] = ""
Else
'[PageFooterControlName1] = [ReportFooterControlName1]
If [Page] = [pages] Then
[rm] = "RM: "
[rm].Visible = True ' THE RM WORD
[Text91] = [temphold1] 'THE CHECK CONVERT ENGLISH WORD
[Text96] = [temphold2] 'THE DISCOUNT PERCENT TEXTBOX
[Text97] = [temphold3] 'THE CASH DISCOUNT TEXTBOX
[Text98] = [temphold4] 'THE HIDDENTOTAL TEXTBOX
从这里开始我不同要如何的 if 勒
Else
If Not IsNull(Text96) Then
[Text96].Visible = True
[Text97] = ""
[Text98] = ""
Else
If Not IsNull(Text97) Then
[Text97].Visible = True
[Text96] = ""
[Text98] = ""
Else
If Not IsNull(Text98) Then
[Text98].Visible = True
[Text96] = ""
[Text97] = ""
End If
End If
End If
End If
End If
[ 本帖最后由 程家伟 于 19-9-2006 04:52 PM 编辑 ] |
|
|
|
|
|
|
|
楼主 |
发表于 19-9-2006 04:44 PM
|
显示全部楼层
可是logic 对吗?
我的result是出现第一段罢了。。。if statement 好像错了
[ 本帖最后由 程家伟 于 19-9-2006 04:56 PM 编辑 ] |
|
|
|
|
|
|
|
楼主 |
发表于 20-9-2006 10:50 AM
|
显示全部楼层
这是昨晚通宵做好的作品。。。呵呵。。。最后的才要print 的字体已经做好咯。。。感觉很像粗造,不过应该可以用。
Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
Dim temphold1 As String
Dim temphold2 As Integer
Dim temphold3 As Integer
Dim temphold4 As Integer
temphold1 = [txtResult]
If Trim([Text62]) = "" Then
temphold2 = [Text62]
[Text96] = ""
[Text97] = ""
[Text98] = ""
Else
If Not IsNull([Text62]) Then
temphold2 = [Text62]
[Text97] = ""
[Text98] = ""
End If
End If
If Trim([Text70]) = "" Then
temphold3 = [Text70]
[Text96] = ""
[Text97] = ""
[Text98] = ""
Else
If Not IsNull([Text70]) Then
temphold3 = [Text70]
[Text96] = ""
[Text98] = ""
End If
End If
If Trim([Text79]) = "" Then
temphold4 = [Text79]
[Text96] = ""
[Text97] = ""
[Text98] = ""
Else
If Not IsNull([Text79]) Then
temphold4 = [Text79]
[Text96] = ""
[Text97] = ""
End If
End If
'at here is page compare to not show out
If [Page] < [pages] Then
[rm] = ""
[Text91] = ""
[Text96] = ""
[Text97] = ""
[Text98] = ""
Else
'[PageFooterControlName1] = [ReportFooterControlName1]
If [Page] = [pages] And Not IsNull(Text62) And [Text62] > "0" Then
[rm] = "RM: "
[rm].Visible = True ' THE RM WORD
[Text91] = [temphold1] 'THE CHECK CONVERT ENGLISH WORD
[Text96] = [temphold2] 'THE DISCOUNT PERCENT TEXTBOX
[Text97] = [temphold3] 'THE CASH DISCOUNT TEXTBOX
[Text98] = [temphold4] 'THE HIDDENTOTAL TEXTBOX
[Text97].Visible = False
[Text98].Visible = False
Else
If [Page] = [pages] And Not IsNull(Text70) And [Text70] > "0" Then
[rm] = "RM: "
[rm].Visible = True ' THE RM WORD
[Text91] = [temphold1] 'THE CHECK CONVERT ENGLISH WORD
[Text96] = [temphold2] 'THE DISCOUNT PERCENT TEXTBOX
[Text97] = [temphold3] 'THE CASH DISCOUNT TEXTBOX
[Text98] = [temphold4] 'THE HIDDENTOTAL TEXTBOX
[Text96].Visible = False
[Text98].Visible = False
Else
If [Page] = [pages] And Not IsNull(Text79) And [Text79] > "0" Then
[rm] = "RM: "
[rm].Visible = True ' THE RM WORD
[Text91] = [temphold1] 'THE CHECK CONVERT ENGLISH WORD
[Text96] = [temphold2] 'THE DISCOUNT PERCENT TEXTBOX
[Text97] = [temphold3] 'THE CASH DISCOUNT TEXTBOX
[Text98] = [temphold4] 'THE HIDDENTOTAL TEXTBOX
[Text96].Visible = False
[Text97].Visible = False
End If
End If
End If
End If
End Sub
'Do the same for each other ReportFooter control you wish to show in the Page Footer. |
|
|
|
|
|
|
| |
本周最热论坛帖子
|