Results 1 to 9 of 9
  1. #1
    MEEMeyer is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    Delaware
    Posts
    5

    Unhappy Printing a report based on one row of data

    I have two tables -- one is customer and the other proposal. I have a query (join) that matches customers with proposals based on customer_id in both tables. I display in a multi row form the proposals and want to select ONE proposal to print.



    How do I select ONLY the join based on the proposal record which has the customer_id? I only want the ONE proposal and it's customer information to print.

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    See if this technique works, using the proposal ID:

    BaldyWeb wherecondition
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    MEEMeyer is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    Delaware
    Posts
    5
    That all sounds wonderful, but I am NOT a seasoned MSAccess developer and certainly not a programmer. I would need detailed instructions.....

    Mike

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Where exactly are you hung up?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    MEEMeyer is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    Delaware
    Posts
    5
    Well -- for one thing, where do I start?

  6. #6
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    MEEMeyer is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    Delaware
    Posts
    5

    a bit more help

    OK, I have entered the following code in VBA:

    "Private Sub Form_DblClick(Cancel As Integer)
    DoCmd.OpenReport "Proposal to Print", , , "FieldName = " & Me.ControlName
    End Sub"

    I have created a form called "Proposal to Print"

    Questions.
    How do I enter a field name i.e. what name do I use?
    What is Me.ControlName?

    I apologize for being so lame, but this is something I've never done in Access.

    Mike

  8. #8
    MEEMeyer is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    Delaware
    Posts
    5
    Also, what do I click on during execution?

  9. #9
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Based on your original description, I would likely use the double click event of the textbox containing the proposal ID, or perhaps the click event of a button. I think either is more intuitive for the user. The double click event of the form itself would probably be problematic.

    You would replace "FieldName" with the name of your proposal ID field, and "ControlName" with the name of the textbox containing that field on the form.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Printing report from Form
    By cotri in forum Access
    Replies: 8
    Last Post: 05-24-2013, 12:01 PM
  2. Report based on query shows no data
    By hbograd in forum Reports
    Replies: 2
    Last Post: 12-18-2009, 12:28 PM
  3. Replies: 16
    Last Post: 06-03-2009, 07:01 AM
  4. Highlighting Report Data Based on a Condition
    By KramerJ in forum Reports
    Replies: 1
    Last Post: 05-29-2009, 10:27 AM
  5. Report Printing Error
    By gjohnson71 in forum Reports
    Replies: 4
    Last Post: 03-07-2009, 12:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums