Office中国论坛/Access中国论坛

标题: 定义变量 [打印本页]

作者: ycxchen    时间: 2009-1-27 13:06
标题: 定义变量
以下的代码是热心肠的6D答复网友时的解答代码:
Dim rs As New ADODB.Recordset       '定义rs为adodb记录集
    Dim strSQL As String                '用了保存sql语句
    Dim ctl As Control                  '定义一个控件对象
    Dim startXH As Integer              '保存开始序号
    Dim startdata As Single             '保存开始数据
    Dim enddata As Single               '结束数据
    Dim endXH As Integer                '结束序号
    Dim Tj As Single                    '保存条件
    Dim total As Single                 '保存数据的累加
我不明Dim strSQL As String   为何解释为“用保存sql语句”的?不是声明strSQL数据类型的吗?
作者: Henry D. Sy    时间: 2009-1-27 13:16
Dim strSQL As String
定义字符串变量strSQL为字符型,该strSQL变量是用来保存sql语句的。
作者: ycxchen    时间: 2009-1-27 13:18
谢谢!




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3