Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
要实现,打开窗口,就能列出未来一个月生日的人的信息。
想直接在窗口中列出,不知道能做到么?
只知道这一句。。接下来不知道怎么写,求教
If e.Row("列名").Addmonths(1) < Date.Today Then
这个是用MessageBox的~
我还想实现一些证书到期复核之类的工作。。。所以想要列出来,看的方便啊
不想提示的话,你可以删除这段代码中的MessageBox的,默认就会自动列出来的。
多个提示不是更好吗?
抱歉一开始没仔细看代码,的确实现了我需要的功能,谢谢
还有一个小问题,我有些信息,时间是空的,也会列出来,怎么加入一个空值排除的判断。我if后面用and提示语法错误,用isnotnull也不行。。。谢谢
Dim ids As String
Dim cnt As Integer
Dim nms As String
For Each dr As DataRow In DataTables("证书信息").DataRows
Dim dt As Date = dr("复核日期")
dt = New Date(dt.year,dt.Month,dt.Day)
If Date.Today.AddMonths(1) > dt Then
cnt = cnt + 1
ids = ids & "," & dr("_Identify")
nms = nms & "," & dr("姓名") & "-" & dr("证书名称")
End If
Next
If cnt > 0 Then
messagebox.show("一个月内有" & cnt & "张证书需要复核, 分别是: " & nms.Trim(","))
Tables("证书信息").filter = "[_Identify] In (" & ids.Trim(",") &")"
End If
谢谢!要学的还有很多啊
想要同时实现数据加亮的功能,也是同样的问题,一些空白的行也被加亮了
这是写在Drawcell里的~~
If e.Row("复核日期").Addmonths(-1) < Date.Today Then
e.Style = "需复核"
End If
If e.Row("复核日期").Addmonths(-1) < Date.Today AndAlso e.Row.IsNull("复核日期") = False Then
e.Style = "需复核"
End If
参考:
http://www.foxtable.com/help/topics/0595.htm
http://www.foxtable.com/help/topics/0426.htm