📄 5420.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 <a href="mailto:gary@mail.aat.com.tw">Gary chen</a> on September 09, 1998 at 11:35:35:<p>
In Reply to: <a href="5300.html">Re: 那!结果是否可行? 有ㄚ...</a> posted by sendy on September 05, 1998 at 10:59:16:<p>
<br>: 有的!!这段程式码要写在<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给你.....<p>那就非常感谢了!因为我还是看不太懂耶!<br>请mail给我参考一下下!
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 5420-->
</ul><!--end: 5420-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -