【VB开源代码栏目提醒】:网学会员--在 VB开源代码编辑为广大网友搜集整理了:doc_update.frm绩等信息,祝愿广大网友取得需要的信息,参考学习。
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form3
Caption = "档案信息修改"
ClientHeight = 5580
ClientLeft = 60
ClientTop = 345
ClientWidth = 9030
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form3"
ScaleHeight = 5580
ScaleWidth = 9030
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command3
Caption = "取消"
Height = 495
Left = 5280
TabIndex = 15
Top = 4200
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "修改"
Height = 495
Left = 1800
TabIndex = 14
Top = 4200
Width = 1215
End
Begin VB.OptionButton Option2
Caption = "不可借"
Height = 375
Left = 3840
TabIndex = 13
Top = 3360
Width = 1215
End
Begin VB.OptionButton Option1
Caption = "可借"
Height = 375
Left = 2520
TabIndex = 12
Top = 3360
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "定位"
Height = 495
Left = 7560
TabIndex = 10
Top = 240
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Left = 2520
TabIndex = 4
Top = 360
Width = 4695
End
Begin VB.TextBox Text2
Height = 375
Left = 2520
TabIndex = 3
Top = 1560
Width = 1935
End
Begin VB.TextBox Text3
Height = 375
Left = 2520
TabIndex = 2
Top = 2160
Width = 4695
End
Begin VB.TextBox Text4
Height = 375
Left = 2520
TabIndex = 1
Top = 2760
Width = 4695
End
Begin VB.ComboBox Combo1
DataSource = "Adodc2"
Height = 330
ItemData = "doc_update.frx":0000
Left = 2520
List = "doc_update.frx":0002
TabIndex = 0
Top = 960
Width = 1935
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 4800
Top = 960
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_ExtentY = 661
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 = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select dname as 标题,dtname as 所属类别,ddept as 发布单位,daddr as 存放位置,dmemo as 说明 from docinfo"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label6
Caption = "借阅标志:"
Height = 375
Left = 840
TabIndex = 11
Top = 3360
Width = 1575
End
Begin VB.Label Label1
Caption = "档案标题:"
Height = 375
Left = 840
TabIndex = 9
Top = 360
Width = 1575
End
Begin VB.Label Label2
Caption = "所属类别:"
Height = 375
Left = 840
TabIndex = 8
Top = 960
Width = 1575
End
Begin VB.Label Label3
Caption = "发布单位:"
Height = 375
Left = 840
TabIndex = 7
Top = 1560
Width = 1575
End
Begin VB.Label Label4
Caption = "存放位置:"
Height = 375
Left = 840
TabIndex = 6
Top = 2160
Width = 1575
End
Begin VB.Label Label5
Caption = "说 明:"
Height = 375
Left = 840
TabIndex = 5
Top = 2760
Width = 1575
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim sql As String
Dim dname As String
dname = Trim(Text1.Text)
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "\file.mdb;Persist Security Info=False"
sql = "select * FROM docinfo where dname= '" & dname & "'"
rs.Open sql, cn, 1, 1
If rs.EOF = True Then
MsgBox "没有找到该档案,请确认是否输入了全称"
Else
Combo1.Text = rs("dtname")
Text2.Text = rs("ddept")
Text3.Text = rs("daddr")
Text4.Text = rs("dmemo")
If rs("dbflag") = 0 Then
Option1.Value = True
Else
Option2.Value = True
End If
End If
End Sub
Private Sub Command2_Click()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim sql As String
Dim dname As String
dname = Trim(Text1.Text)
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "\file.mdb;Persist Security Info=False"
sql = "select * FROM docinfo where dname= '" & dname & "'"
rs.Open sql, cn, 3, 2
rs("dtname") = Combo1.Text
rs("ddept") = Text2.Text
rs("daddr") = Text3.Text
rs("dmemo") = Text4.Text
If Option1.Value = True Then
rs("dbflag") = 0
Else
rs("dbflag") = 1
End If
rs.Update
MsgBox "修改档案信息成功"
Combo1.Text = rs("dtname")
Text2.Text = rs("ddept")
Text3.Text = rs("daddr")
Text4.Text = rs("dmemo")
If rs("dbflag") = 0 Then
Option1.Value = True
Else
Option2.Value = True
End If
End Sub
Private Sub Form_Activate()
Text1.SetFocus
End Sub
Private Sub Form_Load()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim sql As String
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "\file.mdb;Persist Security Info=False"
sql = "select * FROM typeinfo "
rs.Open sql, cn, 1, 1
Do While rs.EOF <> True
Combo1.AddItem rs("tname")
rs.MoveNext
Loop
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "\file.mdb;Persist Security Info=False"
End Sub
上一篇:
doc_query.frm
下一篇:
基于量子反馈的量子态调控方案研究