a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 119|回复: 0

[Access] 判断你的程序是在MDE还是在ADE中运行

[复制链接]
发表于 2012-7-31 22:26:35 | 显示全部楼层 |阅读模式
  Public Function atIsitMDE() As Byte- f! I! p# C2 x6 o
  On Error Resume Next
9 G' o3 b4 Z  I: m% X9 C  Dim dbs As Object
: H+ J- J* z0 p8 F+ w5 Z* p  Dim strMDE As String
) D4 p2 F% i+ B5 Y9 Z  If Application.CurrentProject.ProjectType = acADP Then+ q! K0 p, G, P8 x4 }4 a
  Set dbs = Application.CurrentProject. e( c9 i+ m/ k" f  z! d' J% u
  Else0 _" D2 L; `4 d1 r( b1 r
  Set dbs = CurrentDb()
0 L) O- j6 n, x- K# K  End If
. q! R3 o; \( T" I( p9 t$ P1 B* l  strMDE = dbs.Properties("MDE")7 D- y$ A: q, T% M1 ~  e  P" ]
  If Err = 0 And strMDE = "T" Then
* V7 h) ^; m# x/ }9 W3 B  atIsitMDE = 1* z7 v& Q( \; A. L- F
  Else$ b9 i6 P' X) b
  atIsitMDE = 0
3 J0 E* H$ @# ], V' }0 w  End If
* i0 T& }& [- v& O% P# Z6 {  Set dbs = Nothing( s, ^0 Z2 `; p4 H
  End Function
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-4-29 05:38 , Processed in 0.178691 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表