2 Subforms and sorting...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I would like to create a form with 2 subforms (1) one on the top that shows the form view of the record that is selcted in the (2) bottom portion of the form. And I need the bottom to be sorted by lastname. Can't figure this one out...I really appreciate any help!
 
The bottom portion should be a datasheet form with an
event procedure for clicking on the last name.

Sub LastName_Click()
forms!NameofMainForm.form!
NameofTopSubform.AllowFilters = true
form!NameofMainForm.form!NameofTopSubform.Filter
= "TopSubformID = me.ID"
forms!NameofMainForm.form!NameofTopSubform.Requery
End Sub

That will change the filter on the top subform to the
selected record on the bottom form. If you are using a
string for the key, be sure to set it in quotes.

JohnR
-----Original Message-----
Hello,

I would like to create a form with 2 subforms (1) one on
the top that shows the form view of the record that is
selcted in the (2) bottom portion of the form. And I
need the bottom to be sorted by lastname. Can't figure
this one out...I really appreciate any help!!
 
Back
Top