bsp; End If
If rs.Fields(j).Name = "抵押期限" Then
Text4.Text = rs.Fields(j)
End If
If rs.Fields(j).Name = "抵押日期" Then
DTPicker2.Value = rs.Fields(j)
End If
Next j
End If
End If
Command1.Enabled = True
End If
bb:
End Sub
三:初始登记界面设计
初始界面代码设计:
Option Explicit
Public InitWidth As Long ' Form 的原始大小
Public InitHeight As Long
Public flstype As Integer
Public zdhao1, zdhao As String
Public selrow As Integer
Private Sub Command1_Click()
Dim I As Integer
rs.AddNew
If flxGridhistory.TextMatrix(1, 1) = "" Then
MsgBox "宗地号不能为空!", vbInformation, "输入检查"
Else
For I = 0 To flxGridhistory.Rows - 2
flxGridhistory.Row = I + 1
selrow = flxGridhistory.Row
flstype = rs.Fields(selrow - 1).Type
Select Case flstype
Case 10
rs.Fields(I) = flxGridhistory.TextMatrix(I + 1, 1) & ""
Case 8
If flxGridhistory.TextMatrix(I + 1, 1) <> "" Then
rs.Fields(I) = flxGridhistory.TextMatrix(I + 1, 1)
Else
rs.Fields(I) = DateSerial(1900, 1, 1)
End If
Case 6, 3, 4
If flxGridhistory.TextMatrix(I + 1, 1) <> "" Then
rs.Fields(I) = flxGridhistory.TextMatrix(I + 1, 1)
Else
rs.Fields(I) = 0
End If
End Select
Next I
On Error GoTo errordowith
rs.Update
On Error GoTo 0
db.Recordsets.Refresh
If flxGridhistory.TextMatrix(1, 1) = "" Then
Exit Sub
Else
MsgBox "入库完毕!"
zdhao = flxGridhistory.TextMatrix(1, 1)
End If
Command2.Enabled = True
Command1.Enabled = False
End If
Exit Sub
errordowith:
MsgBox "有重复数据!!!"
End Sub
Private Sub Command2_Click()
rs.FindFirst ("宗地号 = '" & zdhao & "'")
rs.Delete
Dim j As Integer
For j = 1 To flxGridhistory.Rows - 1
flxGridhistory.TextMatrix(j, 1) = ""
Next j
Command2.Enabled = False
End Sub
Private Sub Command3_Click()
Unload Me
frmdengji.Show
End Sub
Private Sub Command4_Click()
Dim j, m As Integer
If flxGridhistory.TextMatrix(1, 1) = "" Then
Private Sub Form_Resize()
Dim D(4) As Double
Dim I As Long
Dim TempPos As Long
Dim StartPos As Long
Dim Ctl As Control
Dim TempVisible As Boolean
Dim ScaleX As Double
Dim ScaleY As Double
ScaleX = ScaleWidth / InitWidth
ScaleY = ScaleHeight / InitHeight
On Error Resume Next
For Each Ctl In Me
TempVisible = Ctl.Visible
Ctl.Visible = False
StartPos = 1
' 读取 Control 的原始位置、大小、字型大小
&n