A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

date order in subforms



 
 
Thread Tools Display Modes
  #1  
Old January 6th, 2008, 11:38 PM posted to microsoft.public.access.forms
larryo
external usenet poster
 
Posts: 26
Default date order in subforms

I have created an input form for a non-profit, with several different
subforms, two of which are "Children" and "Contacts". Everything seems to be
working except for the fact that when viewing date in the subform, I have not
been able to have the data appear in descending date order. For example,
when I view the contacts, I would like to see the most recent contact
information appear first followed by the more dated information. Similarly,
with respect to the 'children', I would like to see data on the oldest child
appear first, followed by the younger children. How do I do that? I have
gone into both the "Contact" table, and the "Children" tables and sorted in
decending order but that doesn't seem to carry over to the form.
larryo
  #2  
Old January 7th, 2008, 01:05 AM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default date order in subforms

On Sun, 6 Jan 2008 15:38:00 -0800, larryo
wrote:

I have
gone into both the "Contact" table, and the "Children" tables and sorted in
decending order but that doesn't seem to carry over to the form.


Correct. A Table is an unordered "bucket" of data. Sorting a table changes the
display of that table in table datasheet view but does not affect reports or
forms based on that table, nor does it change the actual order of records
stored on disk.

Base your Subforms on Queries, and specify the desired sort order in that
Query.

John W. Vinson [MVP]
  #3  
Old January 7th, 2008, 02:28 PM posted to microsoft.public.access.forms
larryo
external usenet poster
 
Posts: 26
Default date order in subforms

John,
Thanks very much for your prompt reply - I appreciate it very much. I am
sure that the procedure you suggest will work, however, I am really just a
novice at Access, and am grateful to have gotten this far. If that's the
only way, I'll just have to keep on struggling, and try to figure out how to
do it. It hasn't been easy!
--
larryo


"John W. Vinson" wrote:

On Sun, 6 Jan 2008 15:38:00 -0800, larryo
wrote:

I have
gone into both the "Contact" table, and the "Children" tables and sorted in
decending order but that doesn't seem to carry over to the form.


Correct. A Table is an unordered "bucket" of data. Sorting a table changes the
display of that table in table datasheet view but does not affect reports or
forms based on that table, nor does it change the actual order of records
stored on disk.

Base your Subforms on Queries, and specify the desired sort order in that
Query.

John W. Vinson [MVP]

  #4  
Old January 7th, 2008, 05:43 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default date order in subforms

On Mon, 7 Jan 2008 06:28:01 -0800, larryo
wrote:

John,
Thanks very much for your prompt reply - I appreciate it very much. I am
sure that the procedure you suggest will work, however, I am really just a
novice at Access, and am grateful to have gotten this far. If that's the
only way, I'll just have to keep on struggling, and try to figure out how to
do it. It hasn't been easy!


It's not all that hard!!

Open the Form that you're using as a subform in design view.

View its Properties.

On the Data tab find the Recordsource property (it's at the top).

Click the ... by it. Access may ask if you want to create a Query based on the
table - accept that offer. A query design grid will appear.

Add all the fields that you want to see on the form, and specify a sort order
on one or more fields (left to right in sorting priority) in the Sort row of
the grid.

Close the query grid and accept Access' offer to save the SQL.

Your form will now display the data sorted in the desired order automatically.

John W. Vinson [MVP]
  #5  
Old January 8th, 2008, 03:41 AM posted to microsoft.public.access.forms
larryo
external usenet poster
 
Posts: 26
Default date order in subforms

John,
You are awesome! I tried what you suggested, and it worked. Thank you so
much!
Larry O'
--
larryo


"John W. Vinson" wrote:

On Mon, 7 Jan 2008 06:28:01 -0800, larryo
wrote:

John,
Thanks very much for your prompt reply - I appreciate it very much. I am
sure that the procedure you suggest will work, however, I am really just a
novice at Access, and am grateful to have gotten this far. If that's the
only way, I'll just have to keep on struggling, and try to figure out how to
do it. It hasn't been easy!


It's not all that hard!!

Open the Form that you're using as a subform in design view.

View its Properties.

On the Data tab find the Recordsource property (it's at the top).

Click the ... by it. Access may ask if you want to create a Query based on the
table - accept that offer. A query design grid will appear.

Add all the fields that you want to see on the form, and specify a sort order
on one or more fields (left to right in sorting priority) in the Sort row of
the grid.

Close the query grid and accept Access' offer to save the SQL.

Your form will now display the data sorted in the desired order automatically.

John W. Vinson [MVP]

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.