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

📄 frmcgechangshang.frm

📁 本系统是北京神兵广告有限公司的广告系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmcgechangshang 
   Caption         =   "Form1"
   ClientHeight    =   7200
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9585
   LinkTopic       =   "Form1"
   ScaleHeight     =   7200
   ScaleWidth      =   9585
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text3 
      Enabled         =   0   'False
      Height          =   270
      Left            =   4800
      TabIndex        =   12
      Top             =   4320
      Width           =   855
   End
   Begin VB.ComboBox Combo2 
      Height          =   300
      Left            =   4800
      TabIndex        =   11
      Top             =   2640
      Width           =   1935
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   4800
      TabIndex        =   10
      Top             =   2040
      Width           =   1935
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Left            =   4800
      TabIndex        =   3
      Top             =   3120
      Width           =   1695
   End
   Begin VB.TextBox Text2 
      Height          =   735
      Left            =   4800
      TabIndex        =   2
      Top             =   3480
      Width           =   2055
   End
   Begin VB.CommandButton command1 
      Caption         =   " 修 改 "
      Height          =   495
      Left            =   2640
      TabIndex        =   1
      Top             =   4800
      Width           =   1695
   End
   Begin VB.CommandButton Command3 
      Caption         =   " 取 消 "
      Height          =   495
      Left            =   5160
      TabIndex        =   0
      Top             =   4800
      Width           =   1695
   End
   Begin VB.Label Label7 
      Caption         =   "当前id:"
      Height          =   255
      Left            =   3000
      TabIndex        =   13
      Top             =   4320
      Width           =   1455
   End
   Begin VB.Label Label1 
      Caption         =   "产品品牌:"
      Height          =   255
      Left            =   3000
      TabIndex        =   9
      Top             =   2040
      Width           =   1455
   End
   Begin VB.Label Label2 
      Caption         =   "广告内容:"
      Height          =   255
      Left            =   3000
      TabIndex        =   8
      Top             =   2640
      Width           =   1455
   End
   Begin VB.Label Label3 
      Caption         =   "广告长度:"
      Height          =   255
      Left            =   3000
      TabIndex        =   7
      Top             =   3120
      Width           =   1455
   End
   Begin VB.Label Label4 
      Caption         =   "备注:"
      Height          =   255
      Left            =   3000
      TabIndex        =   6
      Top             =   3600
      Width           =   1455
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      BackColor       =   &H00FF8080&
      BorderStyle     =   1  'Fixed Single
      Caption         =   " 厂 商 信 息 修 改 "
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   495
      Left            =   0
      TabIndex        =   5
      Top             =   0
      Width           =   9615
   End
   Begin VB.Label Label6 
      Caption         =   "(秒)"
      Height          =   375
      Left            =   6600
      TabIndex        =   4
      Top             =   3120
      Width           =   855
   End
End
Attribute VB_Name = "frmcgechangshang"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Text3.Text = ""
Combo2.Clear
Text1.Text = ""
Text2.Text = ""
Dim sql As String
Dim str As String
Dim con As ADODB.Connection
Set con = New Connection
str = "provider=microsoft.jet.oledb.4.0;Data Source=" & App.Path & "\database.mdb"
con.Open str
Dim rs As ADODB.Recordset
Set rs = New Recordset
sql = "select * from changshang where logo='" & Combo1.Text & "'"
rs.Open sql, con, 1, 1
If Not rs.EOF Then

Combo2.Text = rs!content
Else
msg = MsgBox("当前没有任何厂商信息", 16, "错误")
Unload Me
frmmain.Show

Exit Sub
End If

Do While Not rs.EOF
Combo2.AddItem (rs!content)
rs.MoveNext
Loop

rs.Close
End Sub

Private Sub Combo2_Click()
command1.Enabled = True
Dim sql As String
Dim str As String
Dim con As ADODB.Connection
Set con = New Connection
str = "provider=microsoft.jet.oledb.4.0;Data Source=" & App.Path & "\database.mdb"
con.Open str
Dim rs As ADODB.Recordset
Set rs = New Recordset
sql = "select * from changshang where content='" & Combo2.Text & "'"
rs.Open sql, con, 1, 1

Text1.Text = rs!Size
Text2.Text = rs!other
Text3.Text = rs!id

End Sub

Private Sub Command1_Click()
If Combo1.Text = "" Then
msg = MsgBox("请完整输入字段", 16, "错误")
Combo1.SetFocus
Exit Sub
End If
If Combo2.Text = "" Then
msg = MsgBox("请完整输入字段", 16, "错误")
Combo2.SetFocus
Exit Sub
End If
If Text1.Text = "" Then
msg = MsgBox("请完整输入字段", 16, "错误")
Combo2.SetFocus
Exit Sub
End If

If Text2.Text = "" Then
msg = MsgBox("请完整输入字段", 16, "错误")
Combo2.SetFocus
Exit Sub
End If
If Text3.Text = "" Then
msg = MsgBox("您当前选择的记录有误", 16, "错误")
Combo2.SetFocus
Exit Sub
End If
Dim sql As String
Dim str As String
Dim con As ADODB.Connection
Set con = New Connection
str = "provider=microsoft.jet.oledb.4.0;Data Source=" & App.Path & "\database.mdb"
con.Open str
Dim rs As ADODB.Recordset
Set rs = New Recordset
sql = "select * from changshang where id=" & Text3.Text
rs.Open sql, con, 3, 2
rs!logo = Combo1.Text
rs!content = Combo2.Text
rs!Size = Text1.Text
rs!other = Text2.Text
rs.Update
rs.Close
Set rs = Nothing
Set rs = New Recordset
sql = "select * from changshang where id=" & Text3.Text
rs.Open sql, con, 1, 1
Combo1.Text = rs!logo
Combo2.Text = rs!content
Text1.Text = rs!Size
Text2.Text = rs!other
Text3.Text = rs!id
msg = MsgBox("修改成功", 32, "成功拉")


End Sub


Private Sub Command3_Click()
Unload Me
frmmain.Show
End Sub

Private Sub Form_Load()
command1.Enabled = False
Dim sql As String
Dim str As String
Dim con As ADODB.Connection
Set con = New Connection
str = "provider=microsoft.jet.oledb.4.0;Data Source=" & App.Path & "\database.mdb"
con.Open str
Dim rs As ADODB.Recordset
Set rs = New Recordset
sql = "select distinct logo from changshang "
rs.Open sql, con, 1, 1
If Not rs.EOF Then

Combo1.Text = rs!logo
Else
msg = MsgBox("当前没有任何厂商信息", 16, "错误")
Me.Hide
frmmain.Show

Exit Sub
End If

Do While Not rs.EOF
Combo1.AddItem (rs!logo)
rs.MoveNext
Loop

rs.Close
End Sub

⌨️ 快捷键说明

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