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  

How to order in subforms



 
 
Thread Tools Display Modes
  #1  
Old April 2nd, 2007, 08:54 PM posted to microsoft.public.access.forms
Tazzy via AccessMonster.com
external usenet poster
 
Posts: 20
Default How to order in subforms

Hi all,

I have a database of 200+ students. Most of their details are shown on their
main form. However I also need to show within this form the details of any
absences from placements they attend. The main table for the students has an
autonumber for the primary key as does the table for the absences. I
couldn't use either the student ID or the date in this table as the primary
key as both need to be duplicated.

I entered the absence table into the main student form as a subform and all
works well, it display all of the data that is needed. The only problem is
that the subform insists on displaying the its data in order of its primary
key, the autonumber. I would like it to be displayed in date order, but just
seem to be running around in circles with it. I did try a query with all
data from the absence table, then sorted it for the date and tried basing the
subform on that. It was entered ok, but still in order of the primary key.

Am I missing something really basic? If so, be gentle with your answers, I'm
still learning.

Thanks

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200704/1

  #2  
Old April 3rd, 2007, 11:25 AM posted to microsoft.public.access.forms
Vladimír Cvajniga[_2_]
external usenet poster
 
Posts: 23
Default How to order in subforms

Create a query for your subform and sort data in the table by date order,
eg.
qryAbsence:
SELECT Absence.* from Absence ORDER BY Absence.YourDateField.

In your subform set DataSource: qryAbsence

It should do what you need. If not... don't kill me, pls... ;-)

Vlado

"Tazzy via AccessMonster.com" u26845@uwe pÃ*Å¡e v diskusnÃ*m pÅ™Ã*spÄ›vku
news:701dae1eeaea2@uwe...
Hi all,

I have a database of 200+ students. Most of their details are shown on
their
main form. However I also need to show within this form the details of
any
absences from placements they attend. The main table for the students has
an
autonumber for the primary key as does the table for the absences. I
couldn't use either the student ID or the date in this table as the
primary
key as both need to be duplicated.

I entered the absence table into the main student form as a subform and
all
works well, it display all of the data that is needed. The only problem
is
that the subform insists on displaying the its data in order of its
primary
key, the autonumber. I would like it to be displayed in date order, but
just
seem to be running around in circles with it. I did try a query with all
data from the absence table, then sorted it for the date and tried basing
the
subform on that. It was entered ok, but still in order of the primary
key.

Am I missing something really basic? If so, be gentle with your answers,
I'm
still learning.

Thanks

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200704/1


  #3  
Old April 4th, 2007, 04:32 PM posted to microsoft.public.access.forms
Tazzy via AccessMonster.com
external usenet poster
 
Posts: 20
Default How to order in subforms

Hi VladimÃ*r

Funny how when I tried that at first it didn't work, but on repeating it
worked fine. Must have missed something in the first place.

Thanks for your help.........you will survive

Tazzy

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200704/1

 




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 04:50 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.