Results 1 to 9 of 9

Thread: [RESOLVED] Writing to a "Sequential Access File" & Printing a Report

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2005
    Posts
    19

    Resolved [RESOLVED] Writing to a "Sequential Access File" & Printing a Report

    Can someone please take a look at my code and get me back on track here is what I'm trying to accomplish.

    I want an application that will allow the user to enter the inventory number, quantity, and price of each item in inventory. The application should allow the user to record this information in a sequential access file named la3.dat

    In addition, the application should allow the user to print a report showing the inventory number, quantity, and price of each inventory item, as well as the average price.

    Inventory Number Quantity Item Price
    ABC12 100 10.50
    XYZ35 50 15.99
    KLK25 150 20.00

    Here is what I have thus far for the printing the report:
    VB Code:
    1. Private Sub cmdPrint_Click()
    2.     Dim strIN As String, intQty As Integer, intIP As Integer, intAvg As Integer
    3.     Dim strFont As String, sngSize As Single
    4.     Dim strPS1 As String * 5, strPS2 As String * 3, strPS3 As String * 5
    5.        
    6.    
    7.     strFont = Printer.Font          'save current printer settings
    8.     sngSize = Printer.FontSize
    9.     Printer.Font = "courier new"    'change printer settings
    10.     Printer.FontSize = 10           'print title and headings
    11.     Printer.Print Tab(30); "Boggs Inc.Inventory Report"
    12.     Printer.Print
    13.     Printer.Print Tab(5); "Inventory Number"; Tab(25); "Quatity"; Tab(37); "Item Price"
    14. End Sub

    Please Help
    Last edited by Stormy_VB6; Nov 28th, 2005 at 07:22 PM. Reason: The Title is misleading....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width