Sort Order In a Query

B

Bob

--
Is it possible to have sort order in a query to what was last used, Last
used being at the top of the order?
Thanks for any help...............Bob






..........Jenny Vance
 
B

Bob

Ok, it was a drop down list of expenses that are is alpha order, just
thought it would be good if they stacked them self in order of when they
where selected to use, so then most common records would have been at the
top of the list....thanks Bob
 
F

fredg

Ok, it was a drop down list of expenses that are is alpha order, just
thought it would be good if they stacked them self in order of when they
where selected to use, so then most common records would have been at the
top of the list....thanks Bob

Then you need to add a field (to the table that is used as the combo
row source) that stores the date the item was used. Add this new field
to the query. Then sort the query on that date in Descending order.
 
B

Bob

fredg said:
Then you need to add a field (to the table that is used as the combo
row source) that stores the date the item was used. Add this new field
to the query. Then sort the query on that date in Descending order.

That's makes it sound so easy great thanks Fred.........Bob
 
B

Bob

Bob said:
That's makes it sound so easy great thanks Fred.........Bob
I suppose there is something else I have to do , is to date/Time stamp it,
how do I go about that?
Thanks Bob
 
F

fredg

I suppose there is something else I have to do , is to date/Time stamp it,
how do I go about that?
Thanks Bob

As default value in the date field write:
=Now()

When a new record is added, the current date and time will be saved in
this field. You can always over-write the current time if you wish.

Nothing can be done with your existing records however, unless you
wish to give each of those records an arbitrary date and time value.
 
B

Bob

fredg said:
As default value in the date field write:
=Now()

When a new record is added, the current date and time will be saved in
this field. You can always over-write the current time if you wish.

Nothing can be done with your existing records however, unless you
wish to give each of those records an arbitrary date and time value.
Fred it wasn't when a new record was added that I really wanted to be date
time stamped , but when I used it, by selecting the record in my drop down
list. I have about 20 records and usually only use 4 or 5 of them so thought
it would be easier if those ones where always closer to the
top..............Thanks for your help.........Bob
 
J

John Vinson

Fred it wasn't when a new record was added that I really wanted to be date
time stamped , but when I used it, by selecting the record in my drop down
list. I have about 20 records and usually only use 4 or 5 of them so thought
it would be easier if those ones where always closer to the

YOu'll need to run an Update query from the AfterUpdate event of the
combo box (using VBA code to execute the query).

I will say two things though: 20 rows is a TINY combo box (2000 is
big, 20000 is too big). And if I were a user, I'd get the screaming
meemies from a combo that a) was not in any discernable logical order
b) didn't allow autocomplete and c) kept reordering itself as it was
used!

John W. Vinson[MVP]
 
B

Bob

Ok John. point taken!
Thanks.bob

John Vinson said:
YOu'll need to run an Update query from the AfterUpdate event of the
combo box (using VBA code to execute the query).

I will say two things though: 20 rows is a TINY combo box (2000 is
big, 20000 is too big). And if I were a user, I'd get the screaming
meemies from a combo that a) was not in any discernable logical order
b) didn't allow autocomplete and c) kept reordering itself as it was
used!

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top