For i = 1 To Grdtab.Rows - 1 Grdtab.Row = i
For j = 1 To Grdtab.Cols - 1 Grdtab.Col = j
Grdtab.Text = Trim(rctlist.Fields(j - 1)) Next j
rctlist.MoveNext Next i
rctlist.MoveFirst Else
MsgBox \查询内容不能为空\提示信息\ txtquerydate.SetFocus End If Exit Sub Else
MsgBox \请先完成添加任务!!!\提示信息\End If End Sub
Private Sub cmdqueryNum_Click() If cmdAdd.Caption = \添加\txtquerydate.Text = \cmdfirst.Enabled = False Cmdnext.Enabled = False cmdlast.Enabled = False CmdPrevious.Enabled = False Dim sql As String
sql = \& \ExecuteSql sql
Grdtab.Rows = rctlist.RecordCount + 1
Grdtab.Cols = rctlist.Fields.Count + 1 Grdtab.Row = 0 Grdtab.Col = 0
Grdtab.ColWidth(0) = 300 Grdtab.Col = 1
Grdtab.Text = \维护ID\Grdtab.ColWidth(1) = 800
Grdtab.CellAlignment = flexAlignCenterCenter Grdtab.Col = 2
Grdtab.Text = \维护车辆牌照号\Grdtab.ColWidth(2) = 1800
Grdtab.CellAlignment = flexAlignCenterCenter Grdtab.Col = 3
Grdtab.Text = \维护事项\Grdtab.ColWidth(3) = 1000
Grdtab.CellAlignment = flexAlignCenterCenter Grdtab.Col = 4
Grdtab.Text = \维护时间\Grdtab.ColWidth(4) = 1000
Grdtab.CellAlignment = flexAlignCenterCenter Grdtab.Col = 5 Grdtab.Text = \备注\Grdtab.ColWidth(5) = 1000
Grdtab.CellAlignment = flexAlignCenterCenter If rctlist.RecordCount < 1 Then txtid.Text = \ txtnumber.Text = \ txtdiscrip.Text = \ txtWeihuDate.Text = Date txtbeizhu.Text = \
MsgBox \没有找到你要找的信息\提示信息\ Exit Sub End If
Dim i As Integer Dim j As Integer On Error Resume Next For i = 1 To Grdtab.Rows - 1 Grdtab.Row = i
For j = 1 To Grdtab.Cols - 1 Grdtab.Col = j
Grdtab.Text = Trim(rctlist.Fields(j - 1)) Next j
rctlist.MoveNext Next i
rctlist.MoveFirst Else
MsgBox \请先完成添加任务!!!\提示信息\End If End Sub
Private Sub cmdSave_Click() If rctlist.RecordCount < 1 Then
MsgBox \没有要修改的内容,请“按添加按钮”添加新内容!!!!\提示信息\ Exit Sub End If
If MsgBox(\确定要修改吗!!\修改\ If checkdata = True Then Call savedata rctlist.Update
MsgBox \修改成功\提示信息\
Call Form_Load End If End If End Sub
Private Sub Form_Load() ConnectToServer filldata
If rctlist.RecordCount <> 0 Then showdata Else
txtid.Text = \txtnumber.Text = \txtdiscrip.Text = \txtWeihuDate.Text = Date txtbeizhu.Text = \End If
Picture1.Picture = LoadPicture(App.Path & \Image1.Picture = LoadPicture(App.Path & \Image2.Picture = LoadPicture(App.Path & \Timer1.Enabled = True End Sub
Private Sub Grdtab_Click() Grdtab.Col = 1
orientation = Grdtab.Text If rctlist.RecordCount < 2 Then Grdtab.Enabled = False Exit Sub End If
rctlist.MoveFirst Dim sql As String
相关推荐: