⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 functionmodule1.bas

📁 一个银行的管理系统
💻 BAS
字号:
Attribute VB_Name = "functionModule1"
Function ExecuteSQL(ByVal SQL_In As String) As ADODB.Recordset
  Dim cnnADO1 As New ADODB.Connection
  Dim recADO1 As New ADODB.Recordset
  Dim cnnString2 As String
  Dim string2 As String
  
  string2 = App.Path
  If Right(string2, 1) <> "\" Then
        string2 = string2 & "\"
    End If
      
  cnnString2 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & string2 & "db1.mdb;Persist Security Info=False"
  cnnString3 = cnnString2               '存储位置信息
  
  cnnADO1.Open cnnString2
  recADO1.Open SQL_In, cnnADO1, adOpenStatic, adLockOptimistic
  
  Set ExecuteSQL = recADO1

End Function

Function DateCountP(ByVal dateIn1 As Date, ByVal countN1 As Integer) As Date   '年 加 计数字
  DateCountP = dateIn1 + 365 * countN1
    
End Function

Function DateCountM(ByVal dateIn2 As Date, ByVal dateOut As Date) As Integer   '两年差 数字
    DateCountM = Year(dateIn2) - Year(dateOut)
End Function

Function LLFindOut(ByVal dateIn3 As Date, ByVal countN2 As Integer) As Single
    Dim textSQL As String
    Dim tempPoint As ADODB.Recordset
    
    textSQL = "select * from 利率 where 时间 like'" & dateIn3 & "'"
    Set tempPoint = ExecuteSQL(textSQL)
    Select Case countN2
      Case 1
        LLFindOut = tempPoint.Fields(2)
      Case 2
        LLFindOut = tempPoint.Fields(3)
      Case 3
        LLFindOut = tempPoint.Fields(4)
      Case 5
        LLFindOut = tempPoint.Fields(5)
    End Select
    tempPoint.Close
End Function

'function ZH(byval DBianH integer,)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -