If I have a random access file that contains a record at 1 and a record at 100 how do I code the application so only record 1 and record 100 print without 98 rows of squares representing the "nulls" in between? Following is the print code I am currently using:

VB Code:
  1. Private Sub cmdPrint_Click()
  2.     Dim strFont As String, sngSize As Single
  3.     Dim strPS1 As String * 10, strPS2 As String * 30, strPS3 As String * 1
  4.     Dim intX As Integer
  5.        
  6.     strFont = Printer.Font
  7.     sngSize = Printer.FontSize
  8.     Printer.Font = "courier new"
  9.     Printer.FontSize = 10
  10.    
  11.     Printer.Print Tab(35); "Student Grades"
  12.     Printer.Print
  13.     Printer.Print
  14.     Printer.Print Tab(5); "Student Number"; Tab(30); "Student Name"; Tab(70); "Grade"
  15.     Printer.Print
  16.    
  17.     intX = 1
  18.     Do While Not EOF(1)
  19.         Get #1, intX, udtStuRec
  20.             strPS1 = udtStuRec.strStuNum
  21.             strPS2 = udtStuRec.strStuName
  22.             strPS3 = udtStuRec.strGrade
  23.             Printer.Print Tab(5); strPS1; Tab(30); strPS2; Tab(70); strPS3
  24.             intX = intX + 1
  25.         Get #1, intX, udtStuRec     'reads next record
  26.     Loop
  27.    
  28.     Printer.Print
  29.     Printer.Print
  30.     Printer.Print Tab(5); "End of report"
  31.     Printer.EndDoc
  32.     Printer.Font = strFont
  33.     Printer.FontSize = sngSize
  34.    
  35. End Sub

Thanks,
Wayne