?
Solved

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

Posted on 2014-10-23
9
Medium Priority
?
161 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
LVL 11

Accepted Solution

by:
Dany Balian earned 1000 total points
ID: 40401144
uploaded again
Database101.accdb
0
 
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 51

Assisted Solution

by:Gustav Brock
Gustav Brock earned 1000 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 51

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

765 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