Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / January 2006

Tip: Looking for answers? Try searching our database.

Showing hyperlinks to open other forms after a query.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Trauton - 27 Oct 2005 15:31 GMT
Hi,
I have a form that displays multiple records (form A). I also have a form
that displays the record with all its fields in a single view (form B)
providing more detail.  

Is there a way to have form A display a hyperlink in each of the records so
that if a user clicks on it form B opens and he/she can see all the details
of the chosen record?

Thanks,

Trauton
Bob Miller - 27 Oct 2005 21:32 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.