📄 main_jbzl_myunits.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form main_jbzl_myunits
BorderStyle = 3 'Fixed Dialog
Caption = "基本资料管理-【本单位定义】"
ClientHeight = 3240
ClientLeft = 2775
ClientTop = 4005
ClientWidth = 5730
Icon = "main_jbzl_myunits.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3240
ScaleWidth = 5730
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Tag = "编辑本单位信息"
Begin MSAdodcLib.Adodc Adodc1
Height = 480
Left = 645
Top = 3945
Width = 2505
_ExtentX = 4419
_ExtentY = 847
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
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 = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Frame Frame1
Height = 3015
Left = 195
TabIndex = 0
Top = 90
Width = 5355
Begin VB.TextBox gs
Height = 315
Index = 6
Left = 705
MaxLength = 20
ScrollBars = 2 'Vertical
TabIndex = 14
Top = 2505
Width = 4305
End
Begin VB.TextBox gs
Height = 315
Index = 5
Left = 1530
TabIndex = 12
Top = 2055
Width = 3465
End
Begin VB.TextBox gs
Height = 315
Index = 4
Left = 1200
TabIndex = 10
Top = 1605
Width = 3795
End
Begin VB.TextBox gs
Height = 315
Index = 3
Left = 1035
TabIndex = 8
Top = 1155
Width = 3945
End
Begin VB.TextBox gs
Height = 315
Index = 2
Left = 1065
TabIndex = 6
Top = 705
Width = 3930
End
Begin VB.TextBox gs
Height = 315
Index = 1
Left = 3195
TabIndex = 4
Top = 255
Width = 1815
End
Begin VB.TextBox gs
Height = 315
Index = 0
Left = 1080
TabIndex = 2
Top = 240
Width = 1215
End
Begin VB.Label Label7
Caption = "备注"
Height = 330
Left = 300
TabIndex = 13
Top = 2550
Width = 1035
End
Begin VB.Label Label6
Caption = "开户银行及账号"
Height = 330
Left = 240
TabIndex = 11
Top = 2100
Width = 1365
End
Begin VB.Label Label5
Caption = "税务登记号"
Height = 330
Left = 270
TabIndex = 9
Top = 1650
Width = 1035
End
Begin VB.Label Label4
Caption = "公司地址"
Height = 330
Left = 270
TabIndex = 7
Top = 1200
Width = 1035
End
Begin VB.Label Label3
Caption = "公司全称"
Height = 330
Left = 270
TabIndex = 5
Top = 750
Width = 1035
End
Begin VB.Label Label2
Caption = "公司电话"
Height = 210
Left = 2385
TabIndex = 3
Top = 300
Width = 780
End
Begin VB.Label Label1
Caption = "公司简称"
Height = 330
Left = 270
TabIndex = 1
Top = 300
Width = 1035
End
End
End
Attribute VB_Name = "main_jbzl_myunits"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*************************************************************************
'**模 块 名:main_jbzl_myunits
'**版权说明:吉林省明日科技有限公司享有本软件的所有版权,如果本软件用于商
'** 业用途,必须经过吉林省明日科技有限公司授权。如果提供网上免费
'** 下载,必须经过吉林省明日科技有限公司授权,并保证程序的完整,
'** 不得修改代码、注释和相关内容,否则,我公司将追究其法律责任
'**网 址:www.mingrisoft.com 价值无限,服务无限
'**电 话:(0431)84978981,84978982
'**创 建 人:明日科技
'**日 期:2007-10-31
'**修 改 人:MRLBB
'**日 期:2007-10-31
'**描 述:
'*************************************************************************
Dim rs1 As New ADODB.Recordset '定义数据集对象
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_JXC;Data Source=."
Adodc1.RecordSource = "select * from tb_myunits"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
For i = 0 To 6
If Adodc1.Recordset.Fields(i) <> "" Then gs(i).text = Trim(Adodc1.Recordset.Fields(i))
Next i
End If
Adodc1.Recordset.Update
Adodc1.Refresh
RegInfo Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
Adodc1.RecordSource = "select * from tb_myunits"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
For i = 0 To 6
Adodc1.Recordset.Fields(i) = Trim(gs(i).text) '赋值给rs1.field(i)
Next i
Adodc1.Recordset.Update
Else
If gs(2).text <> "" Then
Adodc1.Recordset.AddNew
For i = 0 To 6
Adodc1.Recordset.Fields(i) = Trim(gs(i).text)
Next i
Adodc1.Recordset.Update '更新数据库
End If
End If
Adodc1.Refresh
End Sub
Private Sub gs_GotFocus(Index As Integer)
gs(Index).BackColor = &HFFFF80
gs(Index).SelStart = 0
gs(Index).SelLength = Len(gs(Index))
End Sub
Private Sub gs_LostFocus(Index As Integer)
gs(Index).BackColor = &HFFFFFF
End Sub
Private Sub gs_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn And Index < 6 Then gs(Index + 1).SetFocus '回车获得焦点
If KeyCode = vbKeyUp And Index > 1 Then gs(Index - 1).SetFocus
End Sub
Private Sub Command1_Click()
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -