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

📄 wanglaidanweimodify.frm

📁 一个医药进存销程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form wanglaidanweiModify 
   Caption         =   "往来单位管理"
   ClientHeight    =   2715
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8160
   LinkTopic       =   "Form1"
   ScaleHeight     =   2715
   ScaleWidth      =   8160
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command4 
      Caption         =   "退 出"
      Height          =   735
      Left            =   7080
      TabIndex        =   16
      Top             =   1920
      Width           =   975
   End
   Begin VB.CommandButton Command3 
      Caption         =   "保 存"
      Height          =   495
      Left            =   7080
      TabIndex        =   15
      Top             =   1320
      Width           =   975
   End
   Begin VB.CommandButton Command2 
      Caption         =   "删 除"
      Height          =   495
      Left            =   7080
      TabIndex        =   14
      Top             =   720
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "修 改"
      Height          =   495
      Left            =   7080
      TabIndex        =   13
      Top             =   120
      Width           =   975
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H8000000A&
      Height          =   2655
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   6975
      Begin VB.TextBox Text2 
         ForeColor       =   &H00000000&
         Height          =   375
         Left            =   4560
         TabIndex        =   6
         Top             =   240
         Width           =   2295
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H00FFFFFF&
         Height          =   375
         Left            =   1080
         TabIndex        =   5
         Top             =   240
         Width           =   2415
      End
      Begin VB.TextBox Text3 
         Height          =   375
         Left            =   1080
         TabIndex        =   4
         Top             =   960
         Width           =   2295
      End
      Begin VB.TextBox Text4 
         Height          =   375
         Left            =   1080
         TabIndex        =   3
         Top             =   1800
         Width           =   2295
      End
      Begin VB.TextBox Text5 
         Height          =   375
         Left            =   4560
         TabIndex        =   2
         Top             =   1800
         Width           =   2295
      End
      Begin VB.TextBox Text6 
         Height          =   375
         Left            =   4560
         TabIndex        =   1
         Top             =   960
         Width           =   2295
      End
      Begin VB.Label Label6 
         Caption         =   "开户帐号:"
         Height          =   255
         Left            =   3480
         TabIndex        =   12
         Top             =   1920
         Width           =   975
      End
      Begin VB.Label Label5 
         Caption         =   "联系电话:"
         Height          =   375
         Left            =   120
         TabIndex        =   11
         Top             =   960
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "税号:"
         Height          =   375
         Left            =   480
         TabIndex        =   10
         Top             =   1920
         Width           =   1095
      End
      Begin VB.Label Label3 
         Caption         =   "联系人:"
         Height          =   255
         Left            =   3720
         TabIndex        =   9
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "联系地址:"
         Height          =   255
         Left            =   3480
         TabIndex        =   8
         Top             =   960
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "往来单位:"
         Height          =   255
         Left            =   120
         TabIndex        =   7
         Top             =   360
         Width           =   1095
      End
   End
End
Attribute VB_Name = "wanglaidanweiModify"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Trecordset3 As New ADODB.Recordset
Sub Bai()
    Text1.Enabled = True
    Text2.Enabled = True
    Text3.Enabled = True
    Text4.Enabled = True
    Text5.Enabled = True
    Text6.Enabled = True

    Command3.Enabled = True
    Text1.BackColor = &HFFFFFF
    Text2.BackColor = &HFFFFFF
    Text3.BackColor = &HFFFFFF
    Text4.BackColor = &HFFFFFF
    Text5.BackColor = &HFFFFFF
    Text6.BackColor = &HFFFFFF

End Sub
Sub Hei()
    Text1.Enabled = False
    Text2.Enabled = False
    Text3.Enabled = False
    Text4.Enabled = False
    Text5.Enabled = False
    Text6.Enabled = False

    Command3.Enabled = False
    Text1.BackColor = &H80000004
    Text2.BackColor = &H80000004
    Text3.BackColor = &H80000004
    Text4.BackColor = &H80000004
    Text5.BackColor = &H80000004
    Text6.BackColor = &H80000004

End Sub
Sub Gridflex()
    If Trecordset3.State = 1 Then Trecordset3.Close
    With Trecordset3
         Set .ActiveConnection = SGWConnection
         .CursorLocation = adUseServer
         .CursorType = adOpenKeyset
         .LockType = adLockOptimistic
         .Source = "Select * from wanglaidanwei where id= val('" & wanglaidanweiID & "')  order by id desc"
         .Open
    End With

       Text1.Text = Trecordset3.Fields("name")
       Text2.Text = Trecordset3.Fields("lianxiren")
       Text3.Text = Trecordset3.Fields("tel")
       Text4.Text = Trecordset3.Fields("shuihao")
       Text5.Text = Trecordset3.Fields("zhanghao")
       Text6.Text = Trecordset3.Fields("dizhi")
'    Trecordset3.Close
'    Set Trecordset3 = Nothing
    
End Sub

Private Sub Command1_Click()
    Bai
    Command1.Enabled = False
    Command3.Enabled = True
    Command2.Enabled = False
    Tag = "2"
End Sub

Private Sub Command2_Click()
    Command3.Enabled = True
    Command1.Enabled = False
    Command2.Enabled = False
    Tag = "1"
End Sub

Private Sub Command3_Click()
If Tag = "1" Then
    If MsgBox("您确定删除本条记录吗?", vbYesNo + vbInformation, "提示") = vbYes Then
       Trecordset3.Delete
       Trecordset3.Requery
       Trecordset3.Close
      'DataToScreen
     ' If SGWConnection.State = adStateOpen Then Closconn
       MsgBox "记录已删除!", vbOKOnly + vbInformation, "提示"
       Unload renyuanModify

      ' Unload Me
    End If
ElseIf Tag = "2" Then
    Trecordset3.Fields("name") = Trim(Text1.Text)
    Trecordset3.Fields("lianxiren") = Trim(Text2.Text)
    Trecordset3.Fields("tel") = Trim(Text3.Text)
    Trecordset3.Fields("shuihao") = Trim(Text4.Text)
    Trecordset3.Fields("zhanghao") = Trim(Text5.Text)
    Trecordset3.Fields("dizhi") = Trim(Text6.Text)
       Trecordset3.Update
       Trecordset3.Requery
       Trecordset3.Close
End If
    Hei
    Command1.Enabled = True
    Command2.Enabled = True
    Command3.Enabled = False
End Sub

Private Sub Command4_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    'set the window in the middle
    Me.Left = (Screen.Width - Me.Width) / 2
    Me.Top = (Screen.Height - Me.Height) / 2
    Hei
    Gridflex
End Sub


⌨️ 快捷键说明

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