Results 1 to 7 of 7
  1. #1
    alextol is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    21

    How to link a Report to a Form

    I am new to Access. I am using 2010 version. Can some one please please explain to me how to generate a report after I type in Client # into the form. I have create form, query and a report. I just need to link them together. Which button should I use? I want the report generate onenter command. How do I do this? Please help!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Options:

    1. VBA (I use only VBA but macro has equivalent structure): DoCmd.OpenReport "report name", , , "ClientID=" & Me.textboxClientID
    Put code in button Click event or textbox AfterUpdate event

    2. http://datapigtechnologies.com/flash...mtoreport.html


    BTW, should not use spaces or special characters/punctuation (underscore is exception) in names, nor reserved words as names. Better would be ClientNum, ClientID, Client_Num, Client_ID.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    alextol is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    21
    Thanks, June7! This was very helpful. I have another question. How do I get rid of duplicate entries on my report? My report is looking like this now:

    client_no name start_date term_date NAICS
    31M Analysis Team 8/26/1997
    541511
    31M Analysis Team 8/26/1997
    541511
    31M Analysis Team 8/26/1997
    541511
    The report is pulling data from query that doesn't have duplicates. I am not sure what causing my report to duplicate the data...

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    If report is based on query object, I don't know why you see something different in report. If you want to provde db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    alextol is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    21
    I rebuit the Report and it works fine now. I must have mess it up earlier. But I have another problem. When I run report for a particular client (I have a combobox where you can type in the client name). I get the whole report starting with the 1st page for about 4,000 clients. How do I make the form to give me info just for the client I asked for?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Use one of the options described in post 2.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    alextol is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    21
    I added ..."FieldName='" & Me.ControlName & "'" to the formula and it worked. Thank you. I appreciate your help!

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

Similar Threads

  1. Link from report to record form
    By John2360 in forum Access
    Replies: 8
    Last Post: 08-13-2013, 01:29 PM
  2. Replies: 4
    Last Post: 12-14-2012, 03:42 PM
  3. Report items link to form
    By pinky33 in forum Reports
    Replies: 2
    Last Post: 04-25-2012, 11:23 AM
  4. Link from one report to another
    By jsimard in forum Reports
    Replies: 2
    Last Post: 02-29-2012, 09:14 AM
  5. Link Report to Form
    By BorisGomel in forum Access
    Replies: 2
    Last Post: 01-30-2012, 08:51 AM

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