Results 1 to 10 of 10
  1. #1
    journeyman is offline Advanced Beginner
    Windows 11 Access 2016
    Join Date
    Dec 2022
    Posts
    85

    Hyperlink to open a specific Form in DB

    Hi all,

    My DB is opened from a hyperlink offered in an email. Click the hyperlink to a short cut. The shortcut allows for opening the main splash screen, which then opens to the main form.

    This main form is a continuous list of records. Click a button, and a single popup form with the selected record detail pops up.

    All very standard stuff.... except, I'm wondering is there is a method that allows a user to click the hyperlink which will then open the DB and navigate to the required pop-up record.

    I don't expect there to be a good answer to this, since I've looked all over google for a clue, but perhaps somebody might have an inventive solution.

    Click a hyperlink in an Outlook email, opens a DB to the required record, and triggers a popup to display.

    Cheers and thank in advance for responses

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Here is a recent thread with the same question, the solution would probably need to include the use of a macro (or the AutoExec macro) to run a VBA function that parses the command argument for the record ID.
    https://www.access-programmers.co.uk.../#post-1829136
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    journeyman is offline Advanced Beginner
    Windows 11 Access 2016
    Join Date
    Dec 2022
    Posts
    85
    Hi and thanks for response.

    I've followed this pathway and found myself at the bottom of a rabbit hole, and no further wiser than when I began the descent.

    So far I have gathered than you should be able to create a link to a batch file. This link would contain a parameter.

    The batch file would then call the MS Access application and pass that parameter into something called the Command function.

    The command function could then be used to open to the specific form and record.

    For example:

    Code:
    "C:\Temp\MyTemp.bat?ID=123"
    Code:
    Echo ID
    \\...Open Access and pass that ID into Autoexec... or something..
    
    Pause
    Result: Access opens with a form displaying record ID 123


    Forgive me if this sounds like nonsense. Problem is, I don't really understand what I'm reading here. Most people that post stuff around the web don't seem to be very explanatory about how to do something.

    Can anybody describe exactly how to write a hyperlink that could be emailed. The hyperlink would then call the batch file, in turn opening access to the record I need displayed.

  4. #4
    Edgar is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    309
    OP, any workaround to this is going to involve a lot of extra scaffolding. What do you want to do this for?

  5. #5
    journeyman is offline Advanced Beginner
    Windows 11 Access 2016
    Join Date
    Dec 2022
    Posts
    85
    Quote Originally Posted by Edgar View Post
    OP, any workaround to this is going to involve a lot of extra scaffolding. What do you want to do this for?
    My DB provides an methodology which effectively creates an email to the appropriate authoriser. The email includes a hyperlink to a shortcut. The shortcut opens the DB with splash screen etc....

    Ideally I would like for the email to include details of the record such that the actual record is opened, rather than forcing the authoriser to search for the record.

    It's not a huge deal (a search feature exists already to locate the specific record), but it's a nice to have feature.

    Cheers and happy Easter

  6. #6
    Edgar is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    309
    How is the hyperlink currently opening the database?

  7. #7
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Hi,
    Here is another thread that explains it a bit better, towards the end there is a sample that is supposed to work.
    https://www.utteraccess.com/topics/1796559#
    But I was thinking about this and there might be an easier way to pass the unique ID as it seems like that was the main issue with the hyperlink; instead of using the Command argument just have the batch file update another small text file that contains that ID. In your front-end have that text file linked so it is available to your macro or code. When the db opens (you would do that from the batch file after updating the ID) it will look for that value in the linked table and open the record then delete it to make it ready for the next one.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  8. #8
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    I have been looking into this a bit more and I couldn't find any posted final solutions, seems like it is not possible to pass an argument from a hyperlink to a batch or VBS file. So I think the easiest solution would be to have a table in which you flag the records for each authoriser and when they open the db a popup would open showing them what records they need to see\approve.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  9. #9
    dblife's Avatar
    dblife is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2011
    Location
    South Shields, UK
    Posts
    104
    In terms of a workaround,
    If the email is already HTML enabled, could you have the usual link to open the db as you say, is already working but also, in the email have the unique record id given in large red letters with a friendly note to enter this ID into the first form they see when the db opens?
    Instead of opening a list of records for them to sort through, have a form that asks them for the record ID they just saw - they should still be able to remember the number and enter it.
    This db front end doesn't have to be your usual front end - it could be a stripped down version of the usual front end that links to the same data on the back end?
    Just a thought.
    Sometimes simpler is better.
    An alternative would be every record save as html to a shared server if security was not an issue.
    You could then use the arguments at the end of the URL to open anything at all, in a nice cosy browser window of their choice from the email.
    I have a function in a db I wrote where the data was meant to be public and every record was saved as an HTML page to a shared drive - it made life much simpler for people to access them (Pardon the pun)

  10. #10
    Edgar is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    309
    The extra scaffolding I was referring to before the OP went away would have involved the use of windows registry to setup a custom url type that triggered the opening of an executable file with support for command line arguments. Second in the list would be the creation of said executable which would output an intermediary file with the form name and the record number, somewhere accessible by both access and the executable. Third would be making the access database check for the existence of this file on open, to read its contents.

    Quite a bit of work and I think the OP doesn't care anymore.

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

Similar Threads

  1. Replies: 4
    Last Post: 08-07-2020, 09:52 AM
  2. Replies: 1
    Last Post: 02-06-2016, 05:30 AM
  3. Replies: 3
    Last Post: 08-18-2015, 05:19 AM
  4. Replies: 8
    Last Post: 11-13-2014, 02:41 PM
  5. Hyperlink to open a form
    By accessnewb in forum Access
    Replies: 12
    Last Post: 07-27-2011, 07:33 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