控件来源=CStr(Year(Date()))+"年"+CStr(Year(Date()))+"月"
控件来源=Year(Date()) & "年" & Month(Date()) & "月"
我操作了一下,在access报表里添加计算控件,下面这个是对的,不过单引号和双引号都可以,+号和&号都可以。
控件来源=Cstr(Year(Date())) + '年' + Cstr(Month(Date())) + '月'
如果是下面这种,结果似乎是2013年 3月
控件来源=Str(Year(Date())) + '年' + Str(Month(Date())) + '月'
控件来源=Year(Date()) & "年" & Month(Date()) & "月"
这种会出现错误。时间和字符不能拼接。
我在access2003上面测试过没问题的。
在控件属性框里填写 =Year(Date()) & "年" & Month(Date()) & "月"
用代码设置才会有问题,请问你的版本和设置方式?