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  

updating sort order if index changes



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2004, 06:11 AM
KB
external usenet poster
 
Posts: n/a
Default updating sort order if index changes

I am having a problem with my forms. I have a database with familyID as the sort order. If I change the familyID, the data is not re-sorted until I exit the form and re-enter... so the record still appears in the same place as before. Is there a way to get the data to resort after the indexed field is changed? (FYI, this is not a key index, because there are duplicates)
  #2  
Old May 26th, 2004, 06:28 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default updating sort order if index changes

Requery the form to force it to reload the records in the correct order
without closing.

Note that this will throw you back to the first record. If you wanted to be
at the same record again after the requery, save the primary key value into
a variable, requery, then FindFirst in the RecordsetClone of the form.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"KB" wrote in message
news
I am having a problem with my forms. I have a database with familyID as
the sort order. If I change the familyID, the data is not re-sorted until I
exit the form and re-enter... so the record still appears in the same place
as before. Is there a way to get the data to resort after the indexed field
is changed? (FYI, this is not a key index, because there are duplicates)


 




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 07:00 AM.


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