📄 frmlocalmsgset.frm
字号:
VERSION 5.00
Begin VB.Form frmLocalMsgSet
BorderStyle = 3 'Fixed Dialog
Caption = "分公司信息设置"
ClientHeight = 3225
ClientLeft = 45
ClientTop = 330
ClientWidth = 5265
Icon = "frmLocalMsgSet.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3225
ScaleWidth = 5265
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.TextBox txtLUploadPath
Height = 345
Left = 2340
TabIndex = 2
Top = 1395
Width = 2280
End
Begin VB.CommandButton cmdExit
Caption = "退出[&X]"
Height = 390
Left = 2505
TabIndex = 8
Top = 2505
Width = 1350
End
Begin VB.CommandButton cmdOK
Caption = "确定[&O]"
Height = 405
Left = 1110
TabIndex = 7
Top = 2505
Width = 1140
End
Begin VB.TextBox txtUploadPath
Height = 345
Left = 2340
TabIndex = 3
Top = 1905
Width = 2280
End
Begin VB.TextBox txtLName
Height = 345
Left = 2340
TabIndex = 1
Top = 900
Width = 2280
End
Begin VB.TextBox txtLCode
Height = 345
Left = 2340
TabIndex = 0
Top = 420
Width = 2280
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "本地数据存放路径:"
Height = 180
Left = 465
TabIndex = 9
Top = 1470
Width = 1620
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "数据传输接收路径:"
Height = 180
Left = 465
TabIndex = 6
Top = 1965
Width = 1620
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "分公司名称:"
Height = 180
Left = 1005
TabIndex = 5
Top = 1005
Width = 1080
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "分公司编码:"
Height = 180
Left = 1005
TabIndex = 4
Top = 525
Width = 1080
End
End
Attribute VB_Name = "frmLocalMsgSet"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
On Error GoTo MyErr
If txtLCode.Text = "" Or txtLName.Text = "" Or txtUploadPath.Text = "" Or txtLUploadPath.Text = "" Then
MsgBox "请填满数据!", vbInformation, "提示窗口"
Exit Sub
End If
Conn.BeginTrans
sSQL = "DELETE LOCALMSG"
Cmd.ActiveConnection = Conn
Cmd.CommandText = sSQL
Cmd.Execute
sSQL = "INSERT INTO LOCALMSG(LCODE,LNAME,UPLOADPATH,LUPLOADPATH) VALUES('" & _
Trim(txtLCode.Text) & "','" & Trim(txtLName.Text) & "','" & _
Trim(txtUploadPath.Text) & "','" & Trim(txtLUploadPath.Text) & "')"
Cmd.ActiveConnection = Conn
Cmd.CommandText = sSQL
Cmd.Execute
Conn.CommitTrans
LCode = txtLCode.Text
LName = txtLName.Text
UploadPath = txtUploadPath.Text
LUploadPath = txtLUploadPath.Text
Unload Me
Exit Sub
MyErr:
MsgBox "", vbExclamation, ""
Conn.RollbackTrans
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then SendKeys "{TAB}"
End Sub
Private Sub Form_Load()
On Error Resume Next
sSQL = "SELECT * FROM LOCALMSG"
Set RsTemp = Nothing
RsTemp.Open sSQL, Conn, adOpenStatic, adLockReadOnly
If Not RsTemp.EOF Then
txtLCode.Text = RsTemp("LCODE")
txtLName.Text = RsTemp("LNAME")
txtUploadPath.Text = RsTemp("UPLOADPATH")
txtLUploadPath.Text = RsTemp("LUPLOADPATH")
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -