473,503 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to hardcode order by

ddtpmyra
333 Contributor
Inside the form properties under data I type 'ORDER BY' date. But everytime the user re-ordering the columns it didn't go back to where it should be organize, which is the date.

Is there a way to hard code this during the form event 'on load' or 'on open'?

Your help is much appreciated!
Sep 22 '11 #1
4 3994
Seth Schrock
2,965 Recognized Expert Specialist
I'm not sure I understand the question fully, but could you base the form off of a query that sorts by the date? I believe that this would still allow users to change the sort to the way that they need it at the time, but every time the form is opened it would be sorted by the date.
Sep 22 '11 #2
ddtpmyra
333 Contributor
Hi Seth Schrock

That's exactly what I'm doing right now. I even put the Order by properties set by date. But every time I do my test and order it by firstname, lastname and when I close and open it, the form inherit the last order by. By the way, I'm using access 2003... and this is the reason why im looking a ways how to hard coded it during an event form.
Sep 22 '11 #3
Seth Schrock
2,965 Recognized Expert Specialist
I did some testing and what I found was that if I sent the form property Order By On Load (under the Data tab) to no, then it didn't remember the previous order settings that I would change. If it was set to yes, then it did remember how I had left the order. Also, I found an article that said that this property had some bugs prior to Access 2007. Some code you could try if the property setting doesn't work is in the Form's on load event. Just put in
Expand|Select|Wrap|Line Numbers
  1. OrderByOnLoad = False
Let me know if that works.
Sep 22 '11 #4
ddtpmyra
333 Contributor
Thanks Seth! It works... I just have to turn it off so i wont capture the last sort in the memory.
Sep 23 '11 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
3638
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
9
2718
by: Steven T. Hatton | last post by:
The following works: template <typename T> struct ID3M{ static const T ID; }; template <typename T> const T ID3M<T>::ID = {{1,0,0},{0,1,0},{0,0,1}};
15
4292
by: | last post by:
The data file is a simple Unicode file with lines of text. BCP apparently doesn't guarantee this ordering, and neither does the import tool. I want to be able to load the data either sequentially...
2
2074
by: Earl Anderson | last post by:
I browse Google MS Access groups frequently and have come upon the word "hardcode" or its variations (hardcoding, hardcoded, hard code, etc) in some of the posts. What exactly is "hardcoding" ? ...
0
1403
by: Tim S. | last post by:
I have an ASP.Net app call another program, "helper.exe", on its same server. I want the helper.exe to always have a user = Administrator (as opposed to the standard aspnet_user inherited from the...
13
4412
by: bevanward | last post by:
Hi All I am finding unexpected results when inserted into a newly created table that has a field of datatype int identity (1,1). Basically the order I sort on when inserting into the table is...
2
1826
by: Rich | last post by:
Hello, I am adding a makeshift Help component to my VB2005 project. That means I am not using HTML help to create a chm (unless someone can explain how you connect a chm file to a project - I...
11
9664
by: Israel | last post by:
I've trying to write a query that seems like it should be simple but for some reason my attempts are not working. This is really a general SQL quesion and doesn't pertain to MySQL but I couldn't...
25
2802
by: DanicaDear | last post by:
Hello again Bytes...I missed you! First, background: In a hotstick lab, we ship orders every two years. We ship a new order and the customer uses the new box to return the previous year's order....
0
7205
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
7093
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
7348
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...
1
7006
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5021
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4685
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3166
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1519
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.