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
    In The Footprints Of Guru Nanak- Fourth Journey In Punjab Sikh Sikhi Sikhism Dec 22, 2016
    In The Footprints Of Guru Nanak-Fourth Itinerary Sikh Sikhi Sikhism Dec 18, 2016
    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

Since you're here... we have a small favor to ask...     Become a Supporter      ::     Make a Contribution     

Share This Page