Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2002
    Location
    Hamilton,Ontario
    Posts
    132

    Unanswered: Print Straight from Form

    Hi ,

    I am working on one production software, I want to place work order and then once the system gets message that " work order has been Placed" i want to display a message asking user " if you like to print that work order"

    How would i do thata straight from the form , wihtout going to the report?
    I want to print wihtout going to report.
    Thank You,
    Thanx in Advance.
    vbaProgrammer

  2. #2
    Join Date
    Nov 2002
    Location
    Hamilton,Ontario
    Posts
    132

    Re: Print Straight from Form

    Thought this would be great for Every one to know

    Set adrsRWOID = curdb.OpenRecordset("Select * from [Manual Ripped Work Order]")
    adrsRWOID.AddNew
    adrsRWOID![Manual Work Order ID] = Form![Manual Work Order ID]
    adrsRWOID![Manual RWO Date] = Date
    adrsRWOID![Item Number Ripped] = Form![Recipe Item Number]
    adrsRWOID![Description] = Desc
    adrsRWOID![Quantity to produce] = formname![Quantity to produce]
    adrsRWOID![Item Number] = Form![Item Number]
    adrsRWOID![Description Finished] = Form![Description]
    If Not IsNull(Form![Instructions]) Then
    adrsRWOID![Instructions] = Form![Instructions]
    End If
    adrsRWOID.Update
    adrsRWOID.MoveLast
    Debug.Print adrsRWOID![Manual RWO ID]
    response = MsgBox("Manual Ripped Work Order Has Been Placed,Would You Like To Print Ripped Work Order?", vbYesNo, "Placing Ripped Work Order")
    If response = ID_YES Then
    DoCmd.OpenReport "Manual Ripped Work Order Report", acNormal, , "[Manual RWO ID] = " & adrsRWOID![Manual RWO ID]
    Else
    GoTo PlaceRWO_Exit
    End If
    GoTo PlaceRWO_Exit

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Long story short, check documentation for the OpenReport method. One of its parameters is "view" which takes one of the following constants:

    acViewDesign
    acViewNormal (default)
    acViewPreview

    acViewNormal prints the report immediately. If you leave this argument blank, the default constant (acViewNormal) is assumed.

    If you used the Wizard to create your code, you may have specified the preview option inadvertently.

    blindman

Posting Permissions

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