943,734 Members | Top Members by Rank

Ad:
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Oct 22nd, 2008
0

Re: Sorting a .mdb database by date?

Ah. OK thank you. I will do that.

Cheers
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Entropy1024 is offline Offline
20 posts
since Oct 2008
Oct 22nd, 2008
0

Re: Sorting a .mdb database by date?

Great, thank you, That fixed it. Sort of anyway

It initially appears to have done nothing, but if I then close my program and restart it then the records are in date order. Is there some way to force a sort at runtime?

Many thanks for the help.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Entropy1024 is offline Offline
20 posts
since Oct 2008
Oct 22nd, 2008
0

Re: Sorting a .mdb database by date?

you need to convert the data in text format to date format and then sort.
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007
Oct 23rd, 2008
0

Re: Sorting a .mdb database by date?

In your code put this query before you bind it in the grid...

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. "select * from [tablename] order by datefield asc"
Reputation Points: 11
Solved Threads: 49
Posting Whiz
jireh is offline Offline
316 posts
since Jul 2007
Oct 26th, 2008
0

Re: Sorting a .mdb database by date?

OK great thanks got it to work. The following code worked.

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. AdHocData.RecordSource = "select * from AdHocData order by StartDateTime asc"
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Entropy1024 is offline Offline
20 posts
since Oct 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Wave In/out APIs
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Database Grid View BUT WHICH ONE???





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC