Option Explicit
' Export the file.
Private Sub cmdExport_Click()
Dim fnum As Integer
Dim file_name As String
Dim database_name As String
Dim db As Database
Dim rs As Recordset
Dim num_fields As Integer
Dim field_width() As Integer
Dim field_value As String
Dim i As Integer
Dim num_processed As Integer    On Error GoTo MiscError    ' Open the output file.
    fnum = FreeFile
    file_name = txtFileName.Text
    Open file_name For Output As fnum    ' Open the database.
    Set db = OpenDatabase(txtDatabaseName.Text)    ' Open the recordset.
    Set rs = db.OpenRecordset( _
        "SELECT * FROM Books ORDER BY Title")    ' Start with the names of the fields.
    num_fields = rs.Fields.Count
    ReDim field_width(0 To num_fields - 1)
    For i = 0 To num_fields - 1
        ' We're only working with Text here. Other
        ' types are different. For example, an
        ' integer may take 2 bytes to store but 6
        ' characters to display.
        field_width(i) = rs.Fields(i).Size
        If field_width(i) < Len(rs.Fields(i).Name) Then
            field_width(i) = Len(rs.Fields(i).Name)
        End If
        field_width(i) = field_width(i) + 1
        Print #fnum, rs.Fields(i).Name;
        Print #fnum, Space$(field_width(i) - _
            Len(rs.Fields(i).Name));
    Next i
    Print #fnum, ""    ' Process the records.
    Do While Not rs.EOF
        num_processed = num_processed + 1
        For i = 0 To num_fields - 1
            field_value = rs.Fields(i).Value
            Print #fnum, field_value & _
                Space$(field_width(i) - _
                Len(field_value));
        Next i
        Print #fnum, ""
        rs.MoveNext
    Loop    ' Close the file and database.
    rs.Close
    db.Close
    Close fnum
    MsgBox "Processed " & _
        Format$(num_processed) & " records."    Exit SubMiscError:
    MsgBox "Error " & Err.Number & _
        vbCrLf & Err.Description
End Sub
Private Sub Form_Load()
    txtDatabaseName.Text = App.Path & "\books.mdb"
    txtFileName.Text = App.Path & "\books.txt"
End Sub////////////////////
问题
 错误提示:field_width(i) = rs.Fields(i).Size无效的方法(size)
    说我field_width(i) = rs.Fields(i).Size中,.size不是有效的方法。
    VB6。0中没有SIZE这个方法,那在VB6。0中用哪个方法与.SIZE等效呢??