Results 1 to 13 of 13
  1. #1
    linuxson is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    26

    Hyperlinking text boxes on Reports to Records in Forms

    Hi

    I built a custom app from scratch which generates reports from the records in my database
    It lists purchase orders in numerical order (with the purchase order number as the line header), followed by whatever is still outstanding on that order just below it


    I would like to make the header linkable to the purchase order in question in my form, basically opening up the exact record for editing once I click on the link
    Which is the best way to achieve this?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,522
    You don't use hyperlink...you just open the record

    docmd.openform "frmRecord",,,"[id]=" & me.txtID

  3. #3
    linuxson is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    26
    Hi RanMan256

    Tried your method on the OnClick event of the text box. Gave me a Compile Error: Method of Data member not found
    The report that I am trying to link from opens up in a separate window, while the form I want it to link back to is a sub-form inside another one
    It's located inside a tabbed form body
    Think this could be the reason why?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,891
    Even though form is already in use and open as a subform, your code should open another instance of the form.

    Assume report is open in Report View, otherwise the textbox Click event would not work.

    I just tested this and it does work.
    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
    linuxson is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    26
    Hi June7

    I used a macro before, and this also just opened up a new instance of the subform...which doesn't help me much
    I have multiple subforms nested inside a master form which is tabbed. It doesn't help the report opens up a new instance
    I need it to occupy and populate the same form as the one I use to compile/edit the record
    I included a screenshot

    The first jpeg shows the Project Details page where I fill in all the project particulars.
    When I click on the "Outstanding" button, it launches the report for the specified project number, showing all outstanding purchase orders
    The purchase order numbers on the report need to link back to the purchase order numbers on the "Orders" page
    My tables were set up in such a way that the purchase order numbers are unique, so they are never duplicated
    I need it to re-populate the empty form with the details of the purchase order number which I clicked on which was on the report

    Click image for larger version. 

Name:	Screen1.1.png 
Views:	13 
Size:	55.8 KB 
ID:	21148

    Click image for larger version. 

Name:	Screen1.2.jpg 
Views:	13 
Size:	166.5 KB 
ID:	21149

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,891
    Then use SetFocus method to return focus to a form or a subform container control. However, returning to a specific record of a subform is not easy.
    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
    linuxson is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    26
    Hence, the thread
    I built this db from scratch +-1.5 yrs ago, and can't remember all the finer details I stuck into this project
    I am trying to catch up with it again, but so far it has been helping me with my job wonderfully
    Its mostly just small tweaks here and there to help streamline it even more that I am trying to achieve
    It still works without it, would just be easier linking directly from the report to the form instead of constantly running Ctr+F in the fields

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,891
    Need to know more about the form design. The purchase number textbox is in a subform? Actually looks like it is directly on tab control on main form. Or is this a navigation form/control? I don't like and don't use.
    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.

  9. #9
    linuxson is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    26
    Hi June

    That is correct. The POrders form is located inside the Main form on a tab
    Basically, what I need is the textbox value on the report stored into a tmp variable or something (not sure how that works),
    return focus to the first tab where the POrders sub-form is located, and then use that temp value to search and return the record in the fields for editing
    Basically the same effect you would have if you selected the entry field and basically just did a Ctrl+F and entered the text to search
    I want the text box on the report to complete this action when you click on it
    I could send you an empty dbase if that would help?

  10. #10
    linuxson is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    26
    Well, stripped all the data except for one record (purchase order)
    You can test whatever you need to with this
    Just hold in Shift when opening the database in order to edit it
    If you don't, it launches the file itself
    Attached Files Attached Files

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,891
    Which report is involved - POrderIndex_File? How should I open it? From the navigation pane triggers an input popup for Pers Number.
    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.

  12. #12
    linuxson is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    26
    Go to the "Expediting" tab and check the number in the "Pers" column
    That is the number which you enter into the popup
    But before you do that, first go back to the "Orders" page and press Alt+E
    This brings up another popup which will need the purchase order number (also found on the "Expediting" page)
    It's case sensitive, to rule out typos
    The next window it opens will allow you to GRN line items that have been delivered
    Uncheck the "Delivered" check, otherwise the order and line item won't show up in the report (as it only shows undelivered line items)
    Sorry, I forgot to do that

    Click image for larger version. 

Name:	Pic.jpg 
Views:	6 
Size:	67.5 KB 
ID:	21203

    Click image for larger version. 

Name:	Pic 2.jpg 
Views:	6 
Size:	45.3 KB 
ID:	21204

    I must admit, it needs a WHOLE lot more polishing, but it does the job so far

  13. #13
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,891
    I seldom use input popups such as InputBox() because it is hard to validate user entry. I NEVER use input popups in queries. How does case sensitive prevent typos?

    Alt+E does nothing.

    What does GRN stand for?

    Which report is involved?
    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. Replies: 1
    Last Post: 05-30-2014, 02:25 PM
  2. Replies: 3
    Last Post: 12-17-2013, 05:14 AM
  3. Reports positioning boxes with text content
    By pierre86 in forum Reports
    Replies: 2
    Last Post: 09-15-2013, 01:05 PM
  4. Forms and filtering with text boxes
    By jlgray0127 in forum Forms
    Replies: 1
    Last Post: 01-16-2012, 02:12 PM
  5. Comparing records using forms, reports or queries
    By jonathanjilla in forum Access
    Replies: 2
    Last Post: 12-10-2011, 10:48 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