Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

Subform Sort Order

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Graham - 14 Nov 2006 20:51 GMT
I have a form with 2 linked subforms.  One form is for data entry and the
other is datasheet view.

They are linked in the main form with
Private Sub Form_Load()
   Set Me.sfmHolidays.Form.Recordset = Me.sfmHolidays2.Form.Recordset
End Sub

The form is for maintaining a Holidays table so it is desirable that the
records are displayed by HolidayDate DESC - I have tried using Order By in
the subforms, but the records are still displayed ascending.

Any suggestions please
Signature

Graham

Alex Dybenko - 15 Nov 2006 12:19 GMT
hi,
Try to sort like:

Private Sub Form_Load()
   Set Me.sfmHolidays.Form.Recordset = Me.sfmHolidays2.Form.Recordset
   Me.sfmHolidays.Form.OrderBy="HolidayDate DESC"
   Me.sfmHolidays.Form.OrderByOn=True
End Sub

Signature

Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

>I have a form with 2 linked subforms.  One form is for data entry and the
> other is datasheet view.
[quoted text clipped - 9 lines]
>
> Any suggestions please
Graham - 15 Nov 2006 21:59 GMT
Thanks Alex

That worked for the data entry subform so I just added the same 2 lines for
the datasheet subform and everything is great.

This forum is invaluable.

Thanks
Signature

Graham

> hi,
> Try to sort like:
[quoted text clipped - 18 lines]
> >
> > Any suggestions please
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.