You don't need a hyperlink. Place this in the OnClick of the control
(could be one of the fields (ReqNo in the example) of the record):
Private Sub ReqNo_Click()
On Error GoTo Err_ReqNo_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "forms B"
stLinkCriteria = "[ReqNo]=" & Me![ReqNo]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_ReqNo_Click:
Exit Sub
Err_ReqNo_Click:
MsgBox Err.Description
Resume Exit_ReqNo_Click
End Sub
Trauton Wrote:
> Hi,
> I have a form that displays multiple records (form A). I also have a
[quoted text clipped - 11 lines]
>
> Trauton

Signature
Bob Miller
Trauton - 27 Oct 2005 23:50 GMT
Bob,
Wow that sounds great. I'll try it!
Thank you very much!
Trauton
> You don't need a hyperlink. Place this in the OnClick of the control
> (could be one of the fields (ReqNo in the example) of the record):
[quoted text clipped - 33 lines]
> >
> > Trauton
Trauton - 25 Jan 2006 21:12 GMT
Hi Bob,
I am now trying to implement the code you suggested. I am hitting a couple
of snags that I am sure are simple to fix -I just don't now how ;-)
The Data Record Source for Form A is based on a query H that filters the
records shown. I added the code to the ReqNo control to form A (in your
example) and made it open form B. The Data Record Source for Form B is also
based on query H.
When I click on the control and it tries to open form B, I get a message
that says: "Enter Parameter Value" and shows me an input field. If I did
this right what should have happened is that form B would have opened showing
the record for the ReqNo control that I clicked on. As a test, I modified
form B to have nothing under Data Record Control Source. When I clicked on
the ReqNo in form A, form B opened but all the fields showed: Name?. This
tells me that the OnClick code in the form A control is working but some how
I am missing something to get it to open the right record.
Do you know how can I fix this? Thanks!!
Trauton
> You don't need a hyperlink. Place this in the OnClick of the control
> (could be one of the fields (ReqNo in the example) of the record):
[quoted text clipped - 33 lines]
> >
> > Trauton