Can I create a link on a record to another record?

C

Courtney G

I am working on form for customer records. For each customer I have multiple
projects. I currently have a subform on the customer form for customer
projects. The subform has a brief description of the project (not the full
project info contained on the project form), but I want a field in the
subform to have a hyperlink so that a user could click on it to bring up the
full form for the project.

Is this possible?

Thanks for any help you can offer!
 
T

Tom van Stiphout

On Fri, 1 May 2009 02:50:01 -0700, Courtney G

The simplest way may be to have this subform be in Continuous Forms
mode (see DefaultView property), and have a button in each row. That
button can find out what the ProjectID is of the current row
(Me.ProjectID) and then open the form (docmd.OpenForm
"frmProject",,,"ProjectID=" & Me.ProjectID)
(of course your object names may vary)

-Tom.
Microsoft Access MVP
 
P

Paul Shapiro

If you want to avoid the space used for a command button, you can add on
OnDoubleClick event to a subform field that implements the same behavior. I
generally do this for all meaningful foreign keys on both main and subforms.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top