Need some Access help... getting a report to dipsplay info

Discussion in 'OT Technology' started by driftwell, Mar 17, 2005.

  1. driftwell

    driftwell New Member

    Joined:
    Oct 7, 2003
    Messages:
    220
    Likes Received:
    0
    Alright... I'm basically fixing/editting the previous person's code (i'm not much of an access user BTW)..

    this is what the goal of this program is.... to be able to take basic info in a database, and put that info (just 1 record) into a flyer that's going to be faxed out.

    So each record is a company's info... then you click this button that opens up a 'report' which should place that info. But when i do so... it doesn't display this info... and it only displays the first record.... even when i go to the right record and click save... still displays the first record.

    any ideas?
     
  2. www.techdo.com

    www.techdo.com New Member

    Joined:
    Mar 5, 2005
    Messages:
    198
    Likes Received:
    0
    Location:
    Europe
    That report takes data from a Table or from a Query ?
     
  3. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    I'll assume you have a form that allows you to enter the data into the database. On this form there is a print report button. If you open up the on click... event, there should be something that says:

    docmd.openreport "FaxReport", acViewPreview, , "CompanyName = '" & me!CompanyName & "'"

    The last part of the statement limits the output of the resultset to just the current company. You'll need to modify it to suit your needs but you should get the drift. If the guy was on the ball, he would have indexed them by a unique number (ID or CompanyID) in which case it would be:

    docmd.openreport "FaxReport", acViewPreview, , "CompanyID = " & me!CompanyID
     
  4. driftwell

    driftwell New Member

    Joined:
    Oct 7, 2003
    Messages:
    220
    Likes Received:
    0
    cool... got it figure out... thanks guys
     

Share This Page