精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>● VB和Basic>>〓〓...数据库技术...〓〓>>Re: 如何在VB中调用ACCESS当中的报表和窗

主题:Re: 如何在VB中调用ACCESS当中的报表和窗
发信人: gongx()
整理人: (2000-03-30 10:36:36), 站内信件
【 在 XiaoLong (小龙) 的大作中提到: 】
: 【 在 gongx (恭喜) 的大作中提到: 】
: : no way la,如果装了access可以在vb中把access做为activex exe调用
:   具体是怎么样呢,能否详细一点点。我很急切需要。
  'References MS Access 8.0 Object Library (this
  'code will work with any verson of Access that
  'supports Automation)
  Dim MSAccess As Access.Application
  Private sub Command1_Click()
    Set MSAccess=NEW Access.Application
    MSAccess.OpenCurrentDatabase(App.Path & "\you.mdb")
    MSAccess.DoCmd.OpenReport "rptYouReport",acViewNormal
    MSAccess.CloseCurrentDatabase
    Set MSAccess=Nothing
  end Sub                   

--
※ 来源:.网易 BBS bbs.netease.com.[FROM: 202.96.134.135]

[关闭][返回]