Results 1 to 7 of 7
  1. #1
    sevanty7 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    37

    Question Interesting Report Idea

    Hello



    I currently have a form in which if you type anything in the textbox and hit the search button it brings up and relative results in a report. It has been requested to me that on each result of the report have a button beside the result that when clicked it opens it up and displays more information that deals with the record.
    You may be wondering "Hey, why don't you just put all the information on the report in the first place?!??" Well unfortunately the way the information within the database was given to me there are duplicate records that have to be kept because even though they are duplicates the duplicates do have different information as there are two primary tables with somewhat similar records although each table has different fields needed in the search results if that makes any sense....

    Anyway I'm just wondering if it is possible to somehow have a button on each individual search result that opens into possibly another report with more information then the inital report haha..

    Thanks for any ideas fellow databasers

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    Sure. You can use this method:

    http://www.baldyweb.com/wherecondition.htm

    but note that the only way it will work is if the report is opened in Report view. Won't work in Print Preview.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    sevanty7 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    37
    I'm kinda confused on what exactly Me.ControlName is.
    For example the inital search brings the results into areport and one of the fields in the report is "Description" so based on the code you gave me I have

    DoCmd.OpenReport "rptadvanceddescription", , , "Description = '" & Me.ControlName & "'"

    It would make sense to me to use the Description field to then bring up more information pertaining to the record based off of the inital search the client did by searching by a related search.
    So after the client entered the description it brings up related descriptions and then from that report they can open another form and view the record with that description but other fields that are with that record but not shown on the inital report.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    From the link "ControlName is the name of the control on the current form that contains the value to be shown on the second form". In other words, the textbox or other control with the value to filter the report. Typically a key field, but could be anything.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    sevanty7 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    37
    Okay so i've never even used VBA code other then copying and pasting stuff from forums, what i understand is this
    DoCmd.OpenReport "srchdescriptionsadvanced", , , "Description = '" & Me.Description & "'"

    which currently when i click the button and run the event pocedure above, a small window pops up that says its printing and then opens up my printing software..

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    Look in VBA help at OpenReport; there's an argument you can use to control that.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    Interesting Report Idea


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

Similar Threads

  1. Interesting Dilema
    By CementCarver in forum Database Design
    Replies: 7
    Last Post: 04-22-2013, 12:54 PM
  2. Replies: 1
    Last Post: 08-03-2012, 12:32 PM
  3. Interesting Query, Need help!!
    By accessdba in forum Queries
    Replies: 1
    Last Post: 10-06-2011, 11:54 AM
  4. Interesting Problem
    By pinecrest515 in forum Programming
    Replies: 1
    Last Post: 12-15-2010, 01:19 PM
  5. Interesting Issue With Report
    By dynamictiger in forum Reports
    Replies: 1
    Last Post: 04-15-2010, 05:40 AM

Tags for this Thread

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