Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

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

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
cssc1
Asked:
cssc1
  • 4
  • 3
  • 2
3 Solutions
 
Dany BalianCTOCommented:
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
 
Dany BalianCTOCommented:
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
 
cssc1Author Commented:
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
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 
Dany BalianCTOCommented:
uploaded again
Database101.accdb
0
 
Dany BalianCTOCommented:
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
 
Gustav BrockCIOCommented:
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
 
cssc1Author Commented:
Dany,
   Same problem. see attached.
SaveAs.jpg
0
 
Gustav BrockCIOCommented:
No. Proceed renaming the file to something.accdb

/gustav
0
 
cssc1Author Commented:
thanks for the assistance
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now