Results 1 to 9 of 9
  1. #1
    Zappa is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2014
    Posts
    4

    How do I create an automatic hyperlink from a Report to a specific Form Entry

    I have a database where we enter digital evidence requests from various sources. Once logged, we have a report called Incomplete Digital Evidence Requests that helps us manage workflow. One of the column headers on this form is called Case #. Each one has a unique value referencing a particular request. I'm wondering if there is a VBA code or non-coding option to assign a hyperlink to each case # in the Incomplete Requests report that corresponds to the particular request generated as a form and housed in a table.

    For example (see attached photo), I'd like to run the report and be able to click on 14-029588 and have it pull up the original request in the Form view.

    Thank you very much for your time and any assistance you can provide would be greatly appreciated!



    - ZappaClick image for larger version. 

Name:	example.jpg 
Views:	12 
Size:	102.4 KB 
ID:	18691

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    if your goal is is to bring up the evidence requests form to a specific record you can do that by opening the form and altering the RECORD SOURCE property via vba

    it looks like you are using a continuous bound form which I do not particularly like but as long as you can capture the case number you can build the SQL statement or you perform the same function you use with your 'find case number' button but supply it with the captured case number from your incomplete digiital evidence requests form.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    I dont think you can do it in a 'report', but if you are looking at multirecord form,
    put a button at the top of the form , on click

    docmd.openform "frmDetail",,,"[Case#]='" & txtCase & "'"

    (It may work with a hyperlinked report.)

  4. #4
    Zappa is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2014
    Posts
    4

    Re:

    Hi Rpeare,

    I have minimum experience when it comes to Access. I do have a fairly good grasp on VBA though. Could you please provide me with what the VBA Code structure would look like to alter the record source. Again, all I want to do is affix a hyperlink to each new Case # that I can open in Report View if possible. I know it has something to do with assigning the hyperlink to the CN when completing the initial form record.

    Thank you again for your help!

    Zappa

    Quote Originally Posted by rpeare View Post
    if your goal is is to bring up the evidence requests form to a specific record you can do that by opening the form and altering the RECORD SOURCE property via vba

    it looks like you are using a continuous bound form which I do not particularly like but as long as you can capture the case number you can build the SQL statement or you perform the same function you use with your 'find case number' button but supply it with the captured case number from your incomplete digiital evidence requests form.

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    I would rather not build something from scratch, can you provide a sample of your database with some garbage data that I could use as a base. Just make a copy of your database and put in some junk data, then zip it up and use the GO ADVANCED button to upload your zipped copy of your sample db

  6. #6
    Zappa is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2014
    Posts
    4

    Re:

    I completely understand that. Thank you very much again for your help with this project! Attached is the requested sample database with junk data
    Attached Files Attached Files

  7. #7
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    Alright my error, I had assumed both of your screen shots were from forms, but one is a report (people interchange report and form all the time here, my fault for not believing you). There is no click event available for controls on a report. The event appears in the properties but it is not usable (it can't reliably pull the field information, it usually just pulls the last record's value for a particular field).

    So my suggestion is to build a form that shows the contents of your report and build your click event into that, then if they want to print the report print your existing report.

    Sorry there is just no way that I know of to have click event (drill down capability) for individual records on a REPORT.

  8. #8
    Zappa is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2014
    Posts
    4
    Makes sense. Thank you for the advice and taking a look at this issue.

    Zappa

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    It is possible with report Layout view, not PrintPreview. But form is still better way.
    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.

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

Similar Threads

  1. creating Automatic Hyperlink
    By zachir in forum Forms
    Replies: 1
    Last Post: 04-22-2013, 12:51 PM
  2. Automatic Date Entry
    By Al77 in forum Access
    Replies: 3
    Last Post: 02-27-2012, 12:06 PM
  3. Replies: 7
    Last Post: 01-12-2011, 01:41 PM
  4. How to create and print unique report for each entry???
    By Stelios Panayides in forum Reports
    Replies: 2
    Last Post: 10-05-2009, 08:54 AM
  5. Automatic Data Entry on a Specific Date
    By alanbrai in forum Programming
    Replies: 2
    Last Post: 11-14-2007, 05:15 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