Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

RE: print a specific record

Discussion in 'Information Technology' started by Ofer Cohen, Jul 28, 2006.

  1. Ofer Cohen

    Ofer Cohen
    Expand Collapse

    The WhereCondition should be

    MyWhereCondition = "[FieldNameInTheTable]= " & Me.[TextBoxNameInTheForm]

    Is that what you did? because you mentioned that the "record ID field on the
    main form"

    If the field you are trying to filter on is text type field, you should add
    a single column before and after the variable

    MyWhereCondition = "[FieldNameInTheTable]= '" & Me.[TextBoxNameInTheForm] &
    Good Luck

    "Deb H" wrote:

    > I am trying to print the current record. This is the code I am using in the
    > on click event
    > Dim MyWhereCondition As String
    > MyWhereCondition = "RecordID= " & Me.InvestigationID
    > DoCmd.OpenReport "rpt_InvestigativeReport", acPreview, , MyWhereCondition
    > It functions, but will only printa specific record. I am using it on the
    > second form that is linked to the record ID field on the main form. The
    > report pulls information from both forms. What am I doing wrong? It prompts
    > me for the record ID and I type 18, but it gives me record 12.
    > --
    > Deb H.
  2. Loading...

    Similar Threads Forum Date
    Footprints Of Guru Nanak In Sri Lanka History of Sikhism May 27, 2016
    Sikhism Preserving the Sikh heritage in Print Sikh Sikhi Sikhism Jan 12, 2016
    Guru Nanak's Foot-Prints in Baghdad's Sands Blogs Oct 22, 2015
    My Story Printed in Sikh Review Sept 2015 Issue Convert's Corner Oct 19, 2015
    Sakhis In The Footprints Of Guru Nanak... Redeeming Noorshah-the Magical Woman Of Kamroop History of Sikhism Mar 18, 2015

Share This Page