以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  关于多个表同时需要的问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=52725)

--  作者:awfkhnbg
--  发布时间:2014/6/21 18:02:00
--  关于多个表同时需要的问题

各位好:

  我初学者,现我有三个表,三个表内都需要设置提醒功能,帮助里的到期提醒设计只能用于一个表,再次写入同样类型的代码时就提示用不了


--  作者:Bin
--  发布时间:2014/6/21 18:11:00
--  
呵呵,不会的. 你是否使用了重复的变量名
--  作者:awfkhnbg
--  发布时间:2014/6/21 18:18:00
--  

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(Date.Today.Year,dt.Month,dt.Day)
    If Date.Today.AddDays(1) = dt Then
        cnt = cnt + 1
        ids = ids & "," & dr("_Identify")
        nms = nms & "," & dr("姓名")
    End If
Next

If cnt > 0 Then
    messagebox.show("有" & cnt & "个客户明天生日, 分别是:  " & nms.Trim(","))
    Tables("客户信息").filter = "[_Identify] In (" & ids.Trim(",") &")"
End If

 

请帮我修改下,最好再加一个,显示并筛选出这些客户


--  作者:awfkhnbg
--  发布时间:2014/6/22 0:21:00
--  
感谢版主,这个问题解决了,还真是变量问题,当你指出是这个问题时,我还不懂什么是变量...