for iRow=0 to datagrid.Rows for iCol=0 to datagrid.Cols if datagrid.text=""then msgbox"DATAGRID中存在记录" next iCol next iRow
不好意思,写错了 if datagrid.text<>"" then ....
楼上的不正确! datagrid.Cols 没有这属性------------------------------------------------------------------ 个人专栏:http://www.csdn.net/develop/author/netauthor/lihonggen0/ ------------------------------------------------------------------ If DataGrid1.ApproxCount = 0 Then MsgBox "没有记录!" End If
打开记录集前加
On Error GoTo endline
打开记录集
用Adodc加
Adodc1.MaxRecords<>0
用DATA加
Data1.Recordset.RecordCount<>0
关闭记录集
End:
for iCol=0 to datagrid.Cols
if datagrid.text=""then msgbox"DATAGRID中存在记录"
next iCol
next iRow
if datagrid.text<>"" then ....
楼上的不正确!
datagrid.Cols 没有这属性------------------------------------------------------------------
个人专栏:http://www.csdn.net/develop/author/netauthor/lihonggen0/
------------------------------------------------------------------ If DataGrid1.ApproxCount = 0 Then
MsgBox "没有记录!"
End If