Dim T_DATA   As Table 运行之后 提示类型未定义
工程”-->“引用”-->“Microsoft   AxtiveX   Data   Objects   2.X   Library这个用过了不好使啊

解决方案 »

  1.   

    定义的类型错误了,没有Table这个类型
      

  2.   

    那应该用什么类型啊。代码如下:
    Private Sub BLOCK_CODE_AFTERUPDATE()    Dim ZAIKOT   As Database
        Dim T_DATA   As Table
        
        Dim KOUJO_CD As Variant
        Dim BUMON_CD As Variant
        Dim BLOCK_CD As Variant
        Dim BLOCK_NM As Variant
        Dim LN       As Variant
        
        If BLOCK_CODE <> BLOCK_CB Or IsNull(BLOCK_CB) Then
        
            KOUJO_CD = KOUJO_CODE
            BUMON_CD = BUMON_CODE
            BLOCK_CD = BLOCK_CODE        LN = BLOCK_NM_GET(KOUJO_CD, BUMON_CD, BLOCK_CD, BLOCK_NM)
        
            BLOCK_NAME = BLOCK_NM
            BLOCK_CB = Format(BLOCK_CD, "00")
        
            If IsNull(BLOCK_NM) Then
                ERR_MSG = C_EMSG060$
                Exit Sub
            Else
                Set ZAIKOT = CurrentDb()
                Set T_DATA = ZAIKOT!OpenTable("TZP082@_3")            Do Until T_DATA!EOF                If CInt(KOUJO_CODE) = T_DATA!KOUJO_CD Then
                        If CInt(BUMON_CODE) = T_DATA!BUMON Then
                            If CInt(BLOCK_CODE) = T_DATA!BLOCK Then
                                ERR_MSG = C_EMSG063$
                                Close
                                Exit Sub
                            End If
                        End If
                    End If                T_DATA.MoveNext            Loop            ERR_MSG = Null            Close
            End If    End If    If BLOCK_FLG = "YES" And IsNull(BLOCK_NAME) <> -1 Then
            PRINT_LN.SetFocus
        End If
        
    End Sub
      

  3.   

    用recordSet之后 下面这句代码报错,怎么修改啊?
    Set T_DATA = ZAIKOT!OpenTable("TZP082@_3")