Search code examples
vbams-accessms-access-forms

Opening Specific Record from Hyperlink on Continuous Subform


Good Morning,

I'm trying to use a textbox hyperlink on a continuous subform to open specific records, with no success so far. Here's a picture of the subform:

enter image description here

Not sure if it's relevant but the form is populated using a query as the information contained has to come from multiple tables.

I want the user to be able to click on any of the links to the right and open another form associated with the record on that row of the continuous form. Access's event builder doesn't seem to have the tools to handle this. If I use a "WHERE" clause it doesn't know how to reference the ID textbox value. I can write it up in VB but I don't know how the reference a specific row on a continuous subform. Maybe the textboxes have an index value?

I just need to know if something like this is possible and the right way to go about doing it. Any help would be very much appreciated, thank you.


Solution

  • Try this:

    Make the hyperlinks command buttons. The captions the same as your hyperlinks. Then the click event should be:

    DoCmd.OpenForm [NAME OF THE FORM YOU WANT TO OPEN], acNormal, "", "[PRIMARYKEY OF THE FORM]] =" & Me.ID, , acNormal