Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Now-Luanda, Angola, Originally - Anna Bay, New South Wales, Australia
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print From Form (2000)

    Have one form that has both the costing calculations (as a subform) - effectively the invoice - and the associated receipt(s) as a subform to that costing sub form.
    Is there a way I can have a button on the costing form to print the costing details as a pre formatted (by me presumeably via a report design) Invoice and one on the receipts sub form to print the receipts details as a pre formatted receipt
    TAI
    Steve
    Dummy from Down Under <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Print From Form (2000)

    How are the subforms linked to the main form, i.e. what are the Link Child Fields and Link Master Fields for the subforms on the main form?

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Now-Luanda, Angola, Originally - Anna Bay, New South Wales, Australia
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print From Form (2000)

    The main form header shows the details and default costs for a particular Meeting. The meeting to be used is chosen based on that neat set default meeting thingy you solved for me yesterday. The costs are then copied to the costing sub form via the =forms process you helped with the other day

    The way this is going, it will have to be named the Hans memorial race program : -)

    The main form details comes from a query which counts how many real, practice and warmup races have been entered into by a particular rider and whether there are any sidecar events.

    The costing table is updated via the costing subform which is linked to the main form on the basis of MeetingID and Rider ID so I can get diferent costing for a particular rider in a particular meeting.

    The receipts sub form has the same parent child set up - MeetingID and RiderID

    At this stage, while I am sure the process is horribly inefficient compared to what you guys could achieve, thanks largely to the help from this group (especially Hans), the whole thing is working very well

    Hope I understood the question properly and have been a bit verbose in the answer in case I have misunderstood
    TIA
    Steve
    Dummy from Down Under <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Print From Form (2000)

    I assume that you want the buttons to print only the costing details and receipt details for the current record in the main form.

    Create reports rptCostingDetails and rptReceiptDetails with the same record source as the subforms.
    Use code like the following in the On Click event of the command buttons on the subforms (of course, you must substitute the appropriate names):

    Private Sub cmdCostingReport_Click()
    DoCmd.OpenReport _
    ReportName:="rptCostingDetails", _
    View:=acViewNormal, _
    WhereCondition:="MeetingID = " & Me.MeetingID & " AND RiderID = " & Me.RiderID
    End Sub

    Private Sub cmdReceiptReport_Click()
    DoCmd.OpenReport _
    ReportName:="rptReceiptDetails", _
    View:=acViewNormal, _
    WhereCondition:="MeetingID = " & Me.MeetingID & " AND RiderID = " & Me.RiderID
    End Sub

    Note: View:=acViewNormal will send the reports directly to the printer; if you want to preview them first, use View:=acViewPreview instead.

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Now-Luanda, Angola, Originally - Anna Bay, New South Wales, Australia
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print From Form (2000)

    Withdrawn - I accidentally (getting tired) changed the data source - let me try it again later I am fuzzing out a bit
    Thanks again
    Steve
    Dummy from Down Under <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

Posting Permissions

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