1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access-Printing a single report off of a single record from an Access database form

Discussion in 'Business Applications' started by DBDolt, Oct 15, 2002.

Thread Status:
Not open for further replies.
  1. DBDolt

    DBDolt Thread Starter

    Joined:
    Sep 11, 2002
    Messages:
    9
    Hello, I am using Access 2000 and have created a database with a command button that opens up a report via a macro. I would like to know how to open up single reports instead of pushing a button that brings up every report, I've been able to open up reports that are based off of queries, queries that have paramenters that need to be inputted in order to bring up single unique records, but I would like to be able to just create a button that brings just that particular unique record-report off of that particular unique record on that form. Meaning that for a record that had just been inputted for John Doe on a form, I would like to know how to create a button on that form to pull up John Doe's single report without having to build a query that asks for a parameter. Is there anyway to do this?
     
  2. downwitchyobadself

    downwitchyobadself

    Joined:
    Oct 13, 2000
    Messages:
    941
    You will have to adapt this to your own form setup; but it's just using the Where line of the OpenReport macro action.

    If on the form MyFormName you have two controls called txtFirstNm and txtLastNm, and in the query underlying the report you have two fields called FirstNm and LastNm, you would put into the Where line of the OpenReport action:
    Code:
    [FirstNm]=[Forms]![MyFormName]![txtFirstNm] And [LastNm]=[Forms]![MyFormName]![txtLastNm] 
    Hope that helps.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/99807

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice