📄 5300.html
字号:
<html>
<head>
<title>Re: 那!结果是否可行? 有ㄚ...</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>Re: 那!结果是否可行? 有ㄚ...</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by sendy on September 05, 1998 at 10:59:16:<p>
In Reply to: <a href="5202.html">那!结果是否可行</a> posted by Gary Chen on September 01, 1998 at 18:02:02:<p>
有的!!这段程式码要写在<br>Private Sub DBGrid_UnboundReadData(ByVal RowBuf As MSDBGrid.RowBuffer, StartLocation As Variant, ByVal ReadPriorRows As Boolean)<br> Dim incr As Integer<br> Dim curRow As Integer<br> Dim maxrow As Integer<br> Dim i As Integer<br> Dim sql As String<br> Dim snpTmp As Recordset<p> sql = "SELECT COST_NO, COST_ITEM, AMT FROM BASIC_COST"<br> sql = sql & " WHERE COST_TYPE = '注册费'"<br> Set snpTmp = gdbEdu.OpenRecordset(sql, dbOpenSnapshot)<br> If snpTmp.BOF And snpTmp.EOF Then Exit Sub<br> snpTmp.MoveLast<br> maxrow = snpTmp.RecordCount<br> <br> If ReadPriorRows Then<br> incr = -1 ' 往前读取<br> Else<br> incr = 1 ' 往后读取<br> End If<p> If IsNull(StartLocation) Then<br> If ReadPriorRows Then<br> curRow = maxrow - 1 ' Reading data from the last row<br> Else<br> curRow = 0 ' Reading data from the first row<br> End If<br> Else<br> curRow = Val(StartLocation) + incr<br> End If<br> i = 0<br> snpTmp.MoveFirst<br> Do While Not snpTmp.EOF<br> RowBuf.Value(i, S_COST_ITEM) = snpTmp!COST_ITEM<br> RowBuf.Value(i, S_COST_AMT) = snpTmp!amt<br> RowBuf.Value(i, S_COST_NO) = snpTmp!cost_No<br> RowBuf.Bookmark(i) = curRow<br> curRow = curRow + incr<br> i = i + 1<br> snpTmp.MoveNext<br> Loop<br> snpTmp.Close<br> RowBuf.RowCount = i<br> mnMaxRow = i<br>End Sub<p>这是小妹上www.apex.com这个站,download一关于dbgrid 用法的范例,再根据自己需求改的, 虽然已可行,但对于这个<br>sub中参数的由来仍不甚清楚,如果你想要这个范例档,我可以mail给你.....<br>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 5300-->
<!--top: 5420--><li><a href="5420.html">Re: 那!结果是否可行? 有ㄚ...</a> <b>Gary chen</b> <i>11:35:35 9/09/98</i>
(<!--responses: 5420-->0)
<ul><!--insert: 5420-->
</ul><!--end: 5420-->
<!--top: 5368--><li><a href="5368.html">Re: 那!结果是否可行? 有ㄚ...</a> <b>xxkuo</b> <i>22:45:59 9/07/98</i>
(<!--responses: 5368-->0)
<ul><!--insert: 5368-->
</ul><!--end: 5368-->
</ul><!--end: 5300-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -