Solved

How to sort data in fields on a form based on date and time?

Posted on 2014-10-23
9
153 Views
Last Modified: 2014-11-02
I have tried using a query to sort the data and for some reason it does not work.

On the “Events_frm” I am trying to add the chronological number of the Event along with the word Event at the beginning of the event description based on the date then time. For example:

“Event 1 – “ The man slipped – 10/22/2014 – 9:00 AM
“Event 2 – “ The man fell – 10/22/2014 – 9:15 AM

If the user enters the events in the wrong order, I want the application to put them in the correct order based on the date and time.
Database101.accdb
0
Comment
Question by:cssc1
  • 4
  • 3
  • 2
9 Comments
 
LVL 11

Expert Comment

by:Dany Balian
ID: 40399571
in the design view of your form, go to data and enter the following in the order field

event_date, event_time
ee1.JPG
0
 
LVL 11

Expert Comment

by:Dany Balian
ID: 40399580
in case, you couldn't find it, That's the full database, with an extra record that i inserted, and that is showing now on top of the form!
Database101.accdb
0
 

Assisted Solution

by:cssc1
cssc1 earned 0 total points
ID: 40399627
Dany,
  For some reason when I try to open the DB you attached it opens like html code.
Can you please try uploading it again?
Thanks
DB-file.jpg
0
 
LVL 11

Accepted Solution

by:
Dany Balian earned 250 total points
ID: 40401144
uploaded again
Database101.accdb
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 11

Expert Comment

by:Dany Balian
ID: 40401146
right click on the link, and click save target as.. instead of just clicking! because both of the old attached database file and the new one.. are working.. i tried downloading them from ee and tested them
0
 
LVL 49

Assisted Solution

by:Gustav Brock
Gustav Brock earned 250 total points
ID: 40401173
Or change the RecordSource of the form to:

SELECT * FROM [2-Events-tbl] ORDER BY Event_Date, Event_Time;

You should never base a form on table directly.

/gustav
0
 

Author Comment

by:cssc1
ID: 40404920
Dany,
   Same problem. see attached.
SaveAs.jpg
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 40404924
No. Proceed renaming the file to something.accdb

/gustav
0
 

Author Closing Comment

by:cssc1
ID: 40417980
thanks for the assistance
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now