Databases(0).OpenRecordset( _
???tblContacts???, dbOpenTable)
???Move to the first record in the database:
rs.MoveFirst
???Print the position in the database:
Debug.Print rs.PercentPosition
???Set the bookmark to the current record:
bk = rs.Bookmark
???Move to the last record in the database:
rs.MoveLast
???Print the position in the database:
Debug.Print rs.PercentPosition
???Move to the bookmarked record:
rs.Bookmark = bk
???Print the position in the database:
Debug.Print rs.PercentPosition
848
Professional Database Development Part IV
rs.Close
Set rs = Nothing
End Sub
Eliminating dead code and unused variables
Before distributing your application, remove any dead code??”code that is not used at all??”from
your application. You will often find entire procedures, or even modules, that once served a purpose
but are no longer called. In addition, it isn??™t uncommon to leave variable declarations in code
after all code that actually uses the variables has been removed. By eliminating dead code and
unused variables, you reduce the amount of memory your application uses and the amount of time
required to compile code at runtime.
Pages:
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618