9741.html

来自「VB技巧问答10000例,是一个教程」· HTML 代码 · 共 30 行

HTML
30
字号
<html>
  <head>
    <title>How to sort database?</title>
  </head>
  <body bgcolor="#FFFFFF" vlink="#808080">
    <center>
      <h1>How to sort database?</h1>
    </center>
<hr size=7 width=75%>

<hr size=7 width=75%><p>
Posted by <a href="mailto:stonechen@ms10.accmail.com.tw">stone</a> on February 01, 1999 at 15:16:57:<p>
I want to sort the database (authors) of bioblio2.mdb according to author.<br>But it failed, why?<p>The program as following:<p>Private Sub Command1_Click()<p>    Dim dbsNorthwind As Database<br>    Dim rstEmployees As Recordset<br>    Dim rstSortEmployees As Recordset<p>   Set dbsNorthwind = OpenDatabase("biblio02.mdb")<br>Set rstEmployees = dbsNorthwind.OpenRecordset<br>("authors", dbOpenDynaset)<p>    With rstEmployees<br>  <br>        .Sort = "[author]"<br>        Set rstSortEmployees = .OpenRecordset<br>       Set Data1.Recordset = rstSortEmployees<br>                        <br>Text1.DataField = "author"<br>Data1.Refresh<br>Data1.Recordset.MoveFirst<p>    End With<br>End Sub<p>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 9741-->
<!--top: 9751--><li><a href="9751.html">Re: How to sort database?</a> <b>尧仔</b> <i>19:50:34 2/01/99</i>
(<!--responses: 9751-->1)
<ul><!--insert: 9751-->
<!--top: 9846--><li><a href="9846.html">Re: How to sort database?</a> <b>stone</b> <i>10:24:34 2/04/99</i>
(<!--responses: 9846-->0)
<ul><!--insert: 9846-->
</ul><!--end: 9846-->
</ul><!--end: 9751-->
</ul><!--end: 9741-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?