drilling down on a subform

  • Thread starter Thread starter paul wheeler
  • Start date Start date
P

paul wheeler

Hi,

Ive created a query which sorts out the records i need.
The query returns an abreviated view of the complete
record.
The results of that query are displayed in a subform in
datasheet view.

What i want to be able to do is click on one of the
abreviated records in the subform and open up another form
with the completed record on show.

ive created the form which displays the full record but
dont know how do sort out the bit that allows me to click
on a record in the subform datasheet and automatically
open up the form and display the correct record.

P.S im a bit of a code novice
 
Hi Paul,

I have a similar scenarios in several of our databases.
One summary form lists limited information to allow you to
see more records at one time...usually in continuous forms
view. Make sure that you include a unique record
identifier on the summary form but you don't have to have
it visible. This is the link to open the detailed form
with the appropriate record.

Select one (or all) of the fields on the summary form to
apply an On Click event to that will launch the detail
form.

The code is:

DoCmd.OpenForm "DetailFormName",
acNormal, , "[TableOrQueryThatFeedsDetailForm]!
[UniqueRecordID]=[Forms]![SummaryFormName]!
[UniqueRecordID]"
 
Thank you,

is this correct

Private Sub onclick()

DoCmd.OpenForm "frmMain", acNormal, , "qryPPLGenerator!ID=
[Forms]!frmPPLGenerator!ID"

End Sub

Im not sure which form [Forms] is to refer to. can you
also advise where i put this code. do i put it this code
on the form (frmMain)which displays the subform ?

Paul (i only have a limited understanding of code and
where it goes)
-----Original Message-----
Hi Paul,

I have a similar scenarios in several of our databases.
One summary form lists limited information to allow you to
see more records at one time...usually in continuous forms
view. Make sure that you include a unique record
identifier on the summary form but you don't have to have
it visible. This is the link to open the detailed form
with the appropriate record.

Select one (or all) of the fields on the summary form to
apply an On Click event to that will launch the detail
form.

The code is:

DoCmd.OpenForm "DetailFormName",
acNormal, , "[TableOrQueryThatFeedsDetailForm]!
[UniqueRecordID]=[Forms]![SummaryFormName]!
[UniqueRecordID]"
-----Original Message-----
Hi,

Ive created a query which sorts out the records i need.
The query returns an abreviated view of the complete
record.
The results of that query are displayed in a subform in
datasheet view.

What i want to be able to do is click on one of the
abreviated records in the subform and open up another form
with the completed record on show.

ive created the form which displays the full record but
dont know how do sort out the bit that allows me to click
on a record in the subform datasheet and automatically
open up the form and display the correct record.

P.S im a bit of a code novice

.
.
 
Back
Top