设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 1427|回复: 3
打印 上一主题 下一主题

论坛坏了,贴不进去?

[复制链接]
跳转到指定楼层
1#
发表于 2003-4-8 17:55:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
怎么贴了N次都不行
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
 楼主| 发表于 2003-4-8 17:55:00 | 只看该作者
Function ap_LogOutCheck(strBackEndPath) As Integer
   
   On Error Resume Next
   ap_LogOutCheck = Dir(strBackEndPath & "\LogOut.FLG", vbHidden) = "LogOut.FLG"
   
End Function

Function ap_FormIsOpen(strFormName As String) As Integer

   Dim frmCurrent As Form
   
   For Each frmCurrent In Forms
      If frmCurrent.Name = strFormName Then
         ap_FormIsOpen = True
         Exit Function
      End If
   Next frmCurrent
   
End Function

Function ap_GetDatabaseProp(dbDatabase As Database, strPropertyName As String) As Variant
  
   ap_GetDatabaseProp = dbDatabase.Containers!Databases _
         .Documents("UserDefined").Properties(strPropertyName).Value
   
End Function
Sub ap_SetDatabaseProp(dbDatabase As Database, strPropertyName As String, varValue As Variant)
   
   dbDatabase.Containers!Databases.Documents("UserDefined").Properties(strPropertyName).Value = varValue

End Sub


Public Sub ap_LinkTables(dbLocal, dynSharedTables, strDataMDB As String)
   
    Dim tdfCurrent As TableDef
    Dim flgAddTable As Boolean
    Dim intTotalTbls As Integer
    Dim intCurrTbl As Integer
   
    On Error GoTo Err_LinkTables
   
    '-- Get the total number of linked tables, then display the progress meter.
    dynSharedTables.MoveLast
    intTotalTbls = dynSharedTables.RecordCount
    dynSharedTables.MoveFirst
   
    SysCmd acSysCmdInitMeter, "Linking Tables....", intTotalTbls
   
    intCurrTbl = 1
   
    Do Until dynSharedTables.EOF
            
        '-- Update the progress meter
        SysCmd acSysCmdUpdateMeter, intCurrTbl
        
        '-- Attempt to open the current link
        On Error Resume Next
        Set tdfCurrent = dbLocal.TableDefs(dynSharedTables!TableName)
        
        flgAddTable = Err.Number
        
        On Error GoTo Err_LinkTables
        
        '-- If there was an error, create the link from scratch,
        '-- otherwise, just update the connect string
        If flgAddTable Then
            
            Set tdfCurrent = dbLocal.CreateTableDef(dynSharedTables!TableName)
            tdfCurrent.SourceTableName = dynSharedTables!TableName
            tdfCurrent.Connect = ";DATABASE=" & strDataMDB
            CurrentDb.TableDefs.Append tdfCurrent
        
        Else
            
            tdfCurrent.Connect = ";DATABASE=" & strDataMDB
            tdfCurrent.RefreshLink
                    
        End If
                  
        dynSharedTables.MoveNext
        intCurrTbl = intCurrTbl + 1
        
    Loop
   
Exit_LinkTables:

    SysCmd acSysCmdRemoveMeter
   
    Exit Sub

Err_LinkTables:
   
    Resume Exit_LinkTables


End Sub
3#
 楼主| 发表于 2003-4-8 17:56:00 | 只看该作者
Function ap_LogOutCheck(strBackEndPath) As Integer
   
   On Error Resume Next
   ap_LogOutCheck = Dir(strBackEndPath & "\LogOut.FLG", vbHidden) = "LogOut.FLG"
   
End Function

Function ap_FormIsOpen(strFormName As String) As Integer

   Dim frmCurrent As Form
   
   For Each frmCurrent In Forms
      If frmCurrent.Name = strFormName Then
         ap_FormIsOpen = True
         Exit Function
      End If
   Next frmCurrent
   
End Function

Function ap_GetDatabaseProp(dbDatabase As Database, strPropertyName As String) As Variant
  
   ap_GetDatabaseProp = dbDatabase.Containers!Databases _
         .Documents("UserDefined").Properties(strPropertyName).Value
   
End Function
4#
 楼主| 发表于 2003-4-8 18:00:00 | 只看该作者
上传都不行?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-11-14 02:59 , Processed in 0.088159 second(s), 28 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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