📄 pressf.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form pressf
BackColor = &H8000000D&
Caption = " "
ClientHeight = 3150
ClientLeft = 10305
ClientTop = 510
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3150
ScaleWidth = 4680
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 2760
Top = 0
Visible = 0 'False
Width = 1335
_ExtentX = 2355
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=图书管理数据库;Data Source=(local)"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=图书管理数据库;Data Source=(local)"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "出版社表"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton cancel
Caption = "返回"
Height = 495
Index = 1
Left = 3960
TabIndex = 2
Top = 2520
Width = 615
End
Begin VB.CommandButton load
Caption = "添加"
Height = 375
Index = 0
Left = 240
TabIndex = 1
Top = 2520
Width = 975
End
Begin VB.Frame frame1
BackColor = &H8000000D&
Caption = "加入出版社信息"
ForeColor = &H80000018&
Height = 2055
Left = 120
TabIndex = 0
Top = 240
Width = 4455
Begin VB.TextBox Text1
DataSource = "Adodc1"
Height = 375
Left = 720
TabIndex = 3
Top = 720
Width = 3015
End
End
End
Attribute VB_Name = "pressf"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim res As ADODB.Recordset
Private Sub Form_activate()
Adodc1.Refresh
End Sub
Private Sub cancel_Click(Index As Integer)
Unload Me
End Sub
Private Sub load_Click(Index As Integer)
If Trim(Text1.Text) = "" Then
MsgBox "数据项不能为空,请重新设置", vbOKOnly + vbExclamation, "信息提示]"
Exit Sub
End If
sqltxt = "select * from 出版社表 where 出版社='" & Trim(Text1.Text) & "'"
Set res = exesql(sqltxt)
If res.RecordCount <> 0 Then
MsgBox "出版社信息存在", vbOKOnly + vbExclamation, "信息提示"
Text1.SetFocus
res.Close
Exit Sub
Else
res.Close
End If
pressf.Adodc1.Recordset.AddNew
pressf.Adodc1.Recordset.Fields("出版社") = Trim(Text1.Text)
pressf.Adodc1.Recordset.Update
MsgBox "添加成功", vbOKOnly + vbExclamation, "信息提示"
Text1.Text = ""
load_nbkf.Adodc2.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -