Installing the following code into the first form that opens in a database will increase the database performance in a network environment, especially with Windows 7.
Option Compare Database
Â
Public Function PrintISAMStats()
   ‘ Print the values returned by the ISAMStats function
   ‘ to the Debug window.
  Â
   Debug.Print “Number of disk reads: “, DBEngine.ISAMStats(0)
   Debug.Print “Number of disk writes: “, DBEngine.ISAMStats(1)
   Debug.Print “Number of reads from cache: “, DBEngine.ISAMStats(2)
   Debug.Print “Number of reads from read-ahead cache: “, DBEngine.ISAMStats(3)
   Debug.Print “Number of locks placed: “, DBEngine.ISAMStats(4)
   Debug.Print “Number of release lock calls: “, DBEngine.ISAMStats(5)
   Debug.Print
End Function
Â
Public Function ResetISAMStats()
   ‘ This procedure resets the values returned by the
   ‘ ISAMStats function to zero.
  Â
   Dim intI As Integer
   ‘ Reset each value.
   For intI = 0 To 5
       DBEngine.ISAMStats intI, True
   Next
End Function
Â
Public Function UpdateISAM()
   DBEngine.SetOption dbMaxBufferSize, 50000
   DBEngine.SetOption dbMaxLocksPerFile, 500000
   ‘DBEngine.SetOption dbFlushTransactionTimeout, 5000
  Â
End Function
Â
Public Function runtest()
‘UpdateISAM
ResetISAMStats
Dim curtime As Date
curtime = Now
Â
DoCmd.OpenForm “frmprc10claims”
PrintISAMStats
Â
Debug.Print “Number of seconds:” & DateDiff(“s”, curtime, Now())
Â
Â
End Function