📄 kf_krqd.frm
字号:
End If
rec.Close
End If
'*****************判断锁号是否已变化
t_rec3.Update
'解锁
Call Pub_UNlock("YD_KRQD", t_rec3)
TT = True
Unload Me
t_rec4.Close
End If '修改结束
'其他操作入点(建立.修改外)
Else
If df_sqb.txk_o = "2" Then
Set t_rec3 = PUB_data.OpenRecordset("SELECT * FROM YD_KRQD WHERE YDD_H='" & yd_h & "'", 2, 0, 2)
If Not t_rec3.BOF Then
t_rec3.MoveLast
'加锁
Do
Select Case Pub_lock("PUBLIC", "YD_KRQD", t_rec3) '判断加锁结果
Case "1" '锁定
Exit Do
Case "2" '
Call Pub_UNlock("YD_KRQD", t_rec3)
Exit Sub
End Select
Loop
t_rec3.Delete
Call Pub_UNlock("YD_KRQD", t_rec3)
End If
t_rec3.Close
TT = True
Unload Me
Else
If df_sqb.txk_o = "4" Then
TT = True
Unload Me
End If
End If
End If
End If
Case 1
TT = False
Unload Me
End Select
End Sub
Private Sub m_jdy_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
m_jddw_mc.SetFocus
m_jddw_mc.SelStart = 0
m_jddw_mc.SelLength = Len(Trim(m_jddw_mc.Text))
End If
End Sub
Private Sub m_kr_m_Change()
m_kr_m.Text = UCase(Trim(m_kr_m.Text))
End Sub
Private Sub m_kr_m_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
m_yw_x.SetFocus
m_yw_x.SelStart = 0
m_yw_x.SelLength = Len(Trim(m_yw_x.Text))
End If
End Sub
Private Sub m_kr_sr_Change()
MSG.Caption = ""
End Sub
Private Sub m_kr_sr_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_kr_sr_LostFocus
End If
End Sub
Private Sub m_kr_sr_LostFocus()
If Not m_kr_sr.Text = " - - " Then
t_rq = date_cl(Trim(m_kr_sr.Text))
If t_rq <> "F" Then
m_kr_sr = t_rq
End If
If IsDate(Trim(m_kr_sr.Text)) Then
If CDate(m_kr_sr.Text) < Date Then
xb(0).SetFocus
Else
MSG.Caption = "无效日期!"
m_kr_sr.SetFocus
m_kr_sr.SelStart = 0
m_kr_sr.SelLength = Len(Trim(m_kr_sr.Text))
Exit Sub
End If
Else
MSG.Caption = "无效日期!"
m_kr_sr.SetFocus
m_kr_sr.SelStart = 0
m_kr_sr.SelLength = Len(Trim(m_kr_sr.Text))
Exit Sub
End If
Else
xb(0).SetFocus
End If
End Sub
Private Sub m_kr_x_Change()
' If m_kr_x.Text = "" Then
' Cmd3(0).Enabled = False
' Else
' Cmd3(0).Enabled = True
' End If
End Sub
Private Sub m_kr_x_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
m_kr_m.SetFocus
m_kr_m.SelStart = 0
m_kr_m.SelLength = Len(Trim(m_kr_m.Text))
End If
End Sub
Private Sub m_kr_x_LostFocus()
m_kr_x.Text = UCase(Trim(m_kr_x.Text))
End Sub
Private Sub m_qzdm_Change()
MSG.Caption = ""
End Sub
Private Sub m_qzdm_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_qzdm_LostFocus
End If
End Sub
Private Sub m_qzdm_LostFocus()
If Not Trim(m_qzdm.Text) = "" Then
Set rec = PUB_data.OpenRecordset("SELECT QZDM,QZMC FROM DT_QZLX WHERE QZDM='" & Trim(UCase(m_qzdm.Text)) & "'", 4)
If Not rec.BOF Then
rec.MoveLast
m_qzmc.Text = UCase(Trim(rec!qzmc))
m_qzsx.SetFocus
m_qzsx.SelStart = 0
m_qzsx.SelLength = Len(Trim(m_qzsx.Text))
Else
MSG.Caption = "无效签证代码"
m_qzdm.SetFocus
m_qzdm.SelStart = 0
m_qzdm.SelLength = Len(Trim(m_qzdm.Text))
End If
rec.Close
Else
If m_qzmc.Enabled = False Then
m_qzmc.Enabled = True
m_qzmc.SetFocus
Else
m_qzmc.SetFocus
End If
End If
End Sub
Private Sub m_qzmc_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_qzmc_LostFocus
End If
End Sub
Private Sub m_qzmc_LostFocus()
If Not Trim(m_qzmc.Text) = "" Then
Set rec = PUB_data.OpenRecordset("SELECT QZDM,QZMC FROM DT_QZLX WHERE QZMC='" & UCase(Trim(m_qzmc.Text)) & "'", 4)
If Not rec.BOF Then
rec.MoveLast
m_qzdm.Text = UCase(Trim(rec!qzdm))
m_qzsx.SetFocus
m_qzsx.SelStart = 0
m_qzsx.SelLength = Len(Trim(m_qzsx.Text))
End If
rec.Close
Else
m_qzsx.SetFocus
m_qzsx.SelStart = 0
m_qzsx.SelLength = Len(Trim(m_qzsx.Text))
End If
End Sub
Private Sub m_qzsx_Change()
MSG.Caption = ""
End Sub
Private Sub m_qzsx_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_qzsx_LostFocus
End If
End Sub
Private Sub m_qzsx_LostFocus()
If Not m_qzsx.Text = " - - " Then
t_rq = date_cl(Trim(m_qzsx.Text))
If t_rq <> "F" Then
m_qzsx = t_rq
End If
If IsDate(Trim(m_qzsx.Text)) Then
If CDate(m_qzsx.Text) >= Date Then
m_dz.SetFocus
Else
MSG.Caption = "无效日期!"
m_qzsx.SetFocus
m_qzsx.SelStart = 0
m_qzsx.SelLength = Len(Trim(m_qzsx.Text))
Exit Sub
End If
Else
MSG.Caption = "无效日期!"
m_qzsx.SetFocus
m_qzsx.SelStart = 0
m_qzsx.SelLength = Len(Trim(m_qzsx.Text))
Exit Sub
End If
Else
m_dz.SetFocus
End If
End Sub
Private Sub m_sydm_Change()
MSG.Caption = ""
End Sub
Private Sub m_sydm_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_sydm_LostFocus
End If
End Sub
Private Sub m_sydm_LostFocus()
If Not Trim(m_sydm.Text) = "" Then
Set rec = PUB_data.OpenRecordset("SELECT SYDM,SYMC FROM DT_LLSY WHERE SYDM='" & UCase(Trim(m_sydm.Text)) & "'", 4)
If Not rec.BOF Then
rec.MoveLast
m_symc.Text = UCase(Trim(rec!symc))
m_jddw_mc.SetFocus
m_jddw_mc.SelStart = 0
m_jddw_mc.SelLength = Len(Trim(m_jddw_mc.Text))
Else
MSG.Caption = "无效事由代码"
m_sydm.SetFocus
m_sydm.SelStart = 0
m_sydm.SelLength = Len(Trim(m_sydm.Text))
End If
rec.Close
Else
If m_symc.Enabled = False Then
m_symc.Enabled = True
m_symc.SetFocus
Else
m_symc.SetFocus
End If
End If
End Sub
Private Sub m_symc_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_symc_LostFocus
End If
End Sub
Private Sub m_symc_LostFocus()
If Not Trim(m_symc.Text) = "" Then
Set rec = PUB_data.OpenRecordset("SELECT SYDM,SYMC FROM DT_LLSY WHERE SYMC='" & UCase(Trim(m_symc.Text)) & "'", 4)
If Not rec.BOF Then
rec.MoveLast
m_sydm.Text = UCase(Trim(rec!sydm))
m_jdy.SetFocus
m_jdy.SelStart = 0
m_jdy.SelLength = Len(Trim(m_jdy.Text))
End If
rec.Close
Else
m_jdy.SetFocus
m_jdy.SelStart = 0
m_jdy.SelLength = Len(Trim(m_jdy.Text))
End If
End Sub
Private Sub m_tsfw_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
m_bz1.SetFocus
End If
End Sub
Private Sub m_yw_m_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
m_gjdm.SetFocus
m_gjdm.SelStart = 0
m_gjdm.SelLength = Len(Trim(m_gjdm.Text))
End If
End Sub
Private Sub m_yw_m_LostFocus()
m_yw_m.Text = UCase(Trim(m_yw_m.Text))
End Sub
Private Sub m_yw_x_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
m_yw_m.SetFocus
m_yw_m.SelStart = 0
m_yw_m.SelLength = Len(Trim(m_yw_m.Text))
End If
End Sub
Private Sub m_yw_x_LostFocus()
m_yw_x.Text = UCase(Trim(m_yw_x.Text))
End Sub
Private Sub m_zjdm_Change()
MSG.Caption = ""
End Sub
Private Sub m_zjdm_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call m_zjdm_LostFocus
End If
End Sub
Private Sub m_zjdm_LostFocus()
If Not Trim(m_zjdm.Text) = "" Then
Set rec = PUB_data.OpenRecordset("SELECT ZJDM,ZJMC FROM DT_ZJZL Where ZJDM='" & Trim(UCase(m_zjdm.Text)) & "'", 4)
If Not rec.BOF Then
rec.MoveLast
m_zjmc.Text = UCase(Trim(rec!zjmc))
m_zjhm.SetFocus
m_zjhm.SelStart = 0
m_zjhm.SelLength = Len(Trim(m_zjhm.Text))
Else
MSG.Caption = "无效证件代码"
m_zjdm.SetFocus
m_zjdm.SelStart = 0
m_zjdm.SelLength = Len(Trim(m_zjdm.Text))
End If
rec.Close
Else
If m_zjmc.Enabled = False Then
m_zjmc.Enabled = True
m_zjmc.SetFocus
Else
m_zjmc.SetFocus
End If
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -