谢谢!

解决方案 »

  1.   


        Set MSAccess = New Access.Application    MSAccess.OpenCurrentDatabase (App.Path & "\你的数据库")    MSAccess.DoCmd.OpenReport "你的报表", acViewNormal    MSAccess.CloseCurrentDatabase    Set MSAccess = Nothing
      

  2.   

    :to strongfisher(haiwolf)
    你好,我按照你说去做的时候,点击运行时,系统说编译无效,用户定义类型未定义!
    请详细的告诉我,好吗?拜托,多谢!
      

  3.   

    Dim fld As FieldObject
        Dim strCnn As String    ' Open the data connection
    '    Set cnn1 = New ADODB.Connection
    '    strCnn = "Provider=MSDASQL;Persist Security Info=False;Data Source=Xtreme Sample Database;Mode=Read"
    '    cnn1.Open strCnn    ' Create a new instance of an ADO command object
        Set datcmd1 = New ADODB.Command
        Set datcmd1.ActiveConnection = cnnCMMS
        datcmd1.CommandText = "Customer"
        datcmd1.CommandType = adCmdTable    ' Add the datasource to the report
        m_RePort.Database.AddADOCommand cnnCMMS, datcmd1
        ' Add a new field object to the report and set the field object to use
        ' the new data source.
        Set fld = m_RePort.Section3.AddFieldObject("{ado.Customer Name}", 0, 0)