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

📄 zhaohaoform.frm

📁 此文件为在VB环境下可用.且有数据库文件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         DataField       =   "卡号"
         Caption         =   "卡号"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column04 
         DataField       =   "办卡日期"
         Caption         =   "办卡日期"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column05 
         DataField       =   "补充码"
         Caption         =   "补充码"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column06 
         DataField       =   "所属班"
         Caption         =   "所属班"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column07 
         DataField       =   "所属院"
         Caption         =   "所属院"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column08 
         DataField       =   "所属校区"
         Caption         =   "所属校区"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         Size            =   156
         BeginProperty Column00 
            ColumnWidth     =   1049.953
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   975.118
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   1035.213
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   1260.284
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   824.882
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   659.906
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   569.764
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   615.118
         EndProperty
         BeginProperty Column08 
            ColumnWidth     =   824.882
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Align           =   2  'Align Bottom
      Height          =   330
      Left            =   0
      Top             =   6765
      Width           =   9270
      _ExtentX        =   16351
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   0
      BackColor       =   -2147483643
      ForeColor       =   255
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=nccc.mdb"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=nccc.mdb"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 基本表  where 卡号 in ( select 卡号 from 总帐表) order by 基本表.卡号 desc"
      Caption         =   "计算中心计费系统"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "zhanghaoform"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset

Private Sub Command1_Click()
On Error GoTo a:
If Len(Text1.Text) = 0 Or Len(Text2.Text) = 0 Then Exit Sub
i = Text1.Text
j = Text2.Text
If j < i Then Exit Sub

For k = i To j
temp = k
  If Len(temp) = 0 Then temp = "0000000"
  If Len(temp) = 1 Then temp = "000000" & temp
  If Len(temp) = 2 Then temp = "00000" & temp
  If Len(temp) = 3 Then temp = "0000" & temp
  If Len(temp) = 4 Then temp = "000" & temp
  If Len(temp) = 5 Then temp = "00" & temp
  If Len(temp) = 6 Then temp = "0" & temp
  
  
sql = "select * from 基本表 where 卡号 ='" & temp & "'"
Set rs = conn.Execute(sql)
If rs.EOF Or rs.BOF Then
MsgBox "卡号:" & temp & "不存在!"
Else
sql = "insert into 总帐表 (卡号) values ('" & temp & "')"
conn.Execute sql
End If
Next
MsgBox "新账号创建完成!"
Adodc1.Refresh
Exit Sub
a:
MsgBox "创建错误,请检查是否有重复账号"
End Sub

Private Sub Command2_Click()
On Error GoTo a:
If Len(Text3.Text) = 0 Then Exit Sub
temp = Text3.Text
sql = "select * from 基本表 where 卡号='" & temp & "'"
Set rs = conn.Execute(sql)
If rs.EOF Or rs.BOF Then
MsgBox "无此用户!"
Exit Sub
Else
sql = "insert into 总帐表 (卡号) values ('" & temp & "')"
conn.Execute sql
End If
MsgBox "新账号创建完成!"
Adodc1.Refresh
Exit Sub
a:
MsgBox "创建错误,请检查是否有重复账号"
Adodc1.Refresh
End Sub

Private Sub Command3_Click()
Adodc1.Refresh
End Sub

Private Sub Command4_Click()
If Adodc1.Recordset.EOF Or Adodc1.Recordset.BOF Then Exit Sub
temp = Adodc1.Recordset("卡号")
sql = "delete * from 总帐表 where 卡号='" & temp & "'"
conn.Execute sql
MsgBox temp & "账号删除完成!"
Adodc1.Refresh
End Sub

Private Sub Command5_Click()
Unload Me
End Sub

Private Sub Command6_Click()
sql = "delete * from 总帐表 where 卡号 not in  (select 卡号 from 基本表)"
conn.Execute sql
MsgBox temp & "账号整理完成!"
Adodc1.Refresh
End Sub

Private Sub Command7_Click()
Adodc1.Refresh
sql = "insert into 总帐表 (卡号) select 卡号 from 基本表"
conn.Execute (sql)
End Sub

Private Sub Form_Load()
conn.Open connstr
End Sub

Private Sub Form_Unload(Cancel As Integer)
Set conn = Nothing
Set rs = Nothing
End Sub

⌨️ 快捷键说明

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