Sending One Field To The Printer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • HB2

    Sending One Field To The Printer

    I have a form with several fields. I want to add a control to click on to
    send the contents of one field to the printer.

    Can someone offer help with the code for this?

    Thank you
    Bill


  • Reggie

    #2
    Re: Sending One Field To The Printer

    Bill, why not design a Report and put one control on it. Set it's control
    source equal to the control on your form like so.

    'If the control is on your main form:
    =[Forms]![MyForm].Form.MyField


    'If the control is on a subform:
    =[Forms]![MyForm]![MySubForm].Form.MyField

    'Place a command button on your form to print the report
    Private Sub MyCommandButton _Click()
    Dim stDocName As String
    stDocName = "MyReport"
    DoCmd.OpenRepor t stDocName, acNormal
    End Sub


    --
    Reggie

    ----------
    "HB2" <bgreer24@comca st.net> wrote in message
    news:8e6yc.7798 9$Ly.46472@attb i_s01...[color=blue]
    > I have a form with several fields. I want to add a control to click on to
    > send the contents of one field to the printer.
    >
    > Can someone offer help with the code for this?
    >
    > Thank you
    > Bill
    >
    >[/color]


    Comment

    Working...