关于生日提醒
假定有个员工表,有姓名和出生日期列,希望能够筛选出今天生日的行,代码为:
Dim nms As String
For Each dr As DataRow In DataTables("员工").DataRows
Dim dt As Date = dr("出生日期")
If dt.Month = Date.Today.Month AndAlso dt.Day = Date.Today.Day Then
nms = nms
&
",'"
&
dr("姓名") &
"'"
End If
Next
If
nms > "" Then
nms = nms.Trim(",")
Tables("员工").filter = "[姓名] In ("
&
nms
&")"
End If
————————————————————————————————————
这是帮助中的代码,我不明白下面这句
nms = nms & ",'" & dr("姓名") & "'"
为什么不用
nms = dr("姓名")
前面的"nms"有什么作用?