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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sub Form

Status
Not open for further replies.

jas0n

MIS
Mar 9, 2005
3
US
Alright I have a question for someone out there. I have four different tables. I created 4 subforms on the bottom of the screen of the main form so that management can see the different data in each of the tables. I then want management to be able to click on one of those fields and it to pull up the record in a different form. Anybody have any ideas how I can do this.
 
You can use the onGotFocus event for the field to open the new form and filter the new form by the values on the subform and or main form

Say subfrm1 has a field "receipt" and when the user clicks on that field you want the full record for that receipt to appear in the form frmFullRecord.

The onGotFocus would open the form frmFullRecord and the filter on the form would limit it to records where receipt= subfrm1 receipt
 
Alright so say I have on my subform the field's business name and business client #, I want them to be able to pull up that record on a new form. Is there anymore insight you can give me on how to code it right?
 
jas0n

Two approaches...
In the subform, add a command button. Make it small, perhaps with a small graphic image, with a height and width of .25" or .3" so it fits on a line. Use the Command button wizard to find a record on another form based on the selected record.

This is the easier approach.

Use the double click event to perform the above. The difference here is that you have to create the code on your own. (Hint: You can copy most of the code generated from the Command button wizard)

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top