473,386 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Retaining Sort Order

Dear All,

I have a subform in datasheet view whose record source is a table (not
a query) A user can right click and customise sort order. Now when the
form is closed VBA code saves for subform with the intention that the
sort order is retained. This works fine in an mdb file but with an mde
the form sort order is not saved.

To work around this I thought about setting the Order by in the table
properties but that particular property doesn't appear to be accessable
through Code. Is this the case?

Can anyone suggest a workaround.

Thanks kindly

Jan 13 '07 #1
2 2505
1) What code are you using to dynamically change the sort and save the
changes?

2) My rule of thumb is to NEVER have a form directly work from table but
always go through a query.
In article <11**********************@s34g2000cwa.googlegroups .com>,
ch********@silverbirches.com.hk says...
Dear All,

I have a subform in datasheet view whose record source is a table (not
a query) A user can right click and customise sort order. Now when the
form is closed VBA code saves for subform with the intention that the
sort order is retained. This works fine in an mdb file but with an mde
the form sort order is not saved.

To work around this I thought about setting the Order by in the table
properties but that particular property doesn't appear to be accessable
through Code. Is this the case?

Can anyone suggest a workaround.

Thanks kindly

Jan 13 '07 #2
"Chris" <ch********@silverbirches.com.hkwrote in message
news:11**********************@s34g2000cwa.googlegr oups.com...
Dear All,

I have a subform in datasheet view whose record source is a table (not
a query) A user can right click and customise sort order. Now when the
form is closed VBA code saves for subform with the intention that the
sort order is retained. This works fine in an mdb file but with an mde
the form sort order is not saved.

To work around this I thought about setting the Order by in the table
properties but that particular property doesn't appear to be accessable
through Code. Is this the case?

Can anyone suggest a workaround.
The sort order of a form in an MDE cannot be changed permanently. You need to
either store the desired sort in a table that can be looked up and applied upon
form opening or else use a query and dynamically change the ORDER BY clause of
the query. That CAN be changed permanently in an MDE and it need only be a
basic...

SELECT * FROM TableName ORDER BY FieldName
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jan 13 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: its me | last post by:
Let's say I have a class of people... Public Class People Public Sex as String Public Age as int Public Name as string end class And I declare an array of this class...
8
by: Deepa | last post by:
I am writing a console app in c# wherein am converting a dataset into a CSV file. It works fine. But I have some values in the dataset which have a comma within(eg. A,B,C). When I view the CSV file...
19
by: jeff | last post by:
how do you convert form byte to Int32 while retaining the binary value of the byte array
1
by: noor | last post by:
Hi I have been working since 2 days to device a method to export sql table into csv format. I have tried using bcp with format option to keep the column names but I'm unable to transfer the file...
20
by: Xah Lee | last post by:
Sort a List Xah Lee, 200510 In this page, we show how to sort a list in Python & Perl and also discuss some math of sort. To sort a list in Python, use the “sort” method. For example: ...
6
by: weetat.yeo | last post by:
Hi all , I have sql statement below , SELECT serial_no,host_name,chasis_model,chasis_flash_size,chasis_dram_size,...
3
by: Nick Douglas | last post by:
I have an unbound form to generate reports from in an mdb that we share on our network drive. The users selects several options for the report, such as what to view, the sort order, etc. These...
0
JAMBAI
by: JAMBAI | last post by:
I have created a ASP.NET application and created two forms (Webform1.aspx & Webform2.aspx). I am displaying the Webform2.aspx based on the Webform1.aspx input, For example if the user didn't...
3
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.