Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clicking in a Subform to launch another linked Form

Status
Not open for further replies.

ChrisJF

MIS
Jun 29, 2003
16
0
0
AU
Hi there, I have a subform which lists data. I want to be able to click on the subform record to launch another form with more detailed information relating to that record.
Is there an elegant solution out there?
Thanks
 
try this...

1. Within your subform, add a rectangle the same size of the subform's detail section, and set the background color of the rectangle to the subform color, and set the border of the rectangle to the same color of your subform. This will make the rectangle appear "invisible" once you complete step 2 below.
2. With the rectangle selected, go to the Format menu, and choose Send to Back to assure all your fields are visible and are not hidden behind the rectangle.
3. Go to the On Click event of the rectangle you created and insert your code.
4. Run the form and click anywhere in the current record outside of a field and it should work. If you want it to work everywhere you click on the record you would need to enter your code in the On Click event of each field.

i hope this helps.
 
I make two forms- one a datasheet for a subform & the other a standard form to appear when the fields are double clicked. I simply put the code into the 'on double click' events of each field in the subform.
 
This worked for another fellow -
Private Sub Form_DblClick(Cancel As Integer)
DoCmd.OpenForm "Form_Name_to_Open", , , "[Key_ID]=forms!Form_Name!Key_ID"
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top