Order a query by order items are chosen

G

Guest

I am using a checkbox to seed a query. I use a Client's form that includes a
checkbox named "Seed". I check the "Seed" box to choose out clients that
will go into a ClientsChosen query. From there I can work with that
particular group of Clients for the time being. When I'm done, I just
uncheck the all the Clients I no longer want included and then go back to my
form and check another batch to seed the ClientsChosen query. Everything
works fine. My problem is, I would like to have the Clients seed into the
ClientsChosen query in the order I check them.... in otherwords, the order
chosen. If I don't use any Order By or Sort properties, the query
automatically orders by the key or unique ID number (for the original table
and subquery).

Anyone have any ideas on how to choose people out of your database, maybe
just 10-12 at a time and have them arrive in the query in the order you chose
them for this session?

Thanks!

Kass
 
G

Guest

I check the "Seed" box to choose out clients that will go into a
ClientsChosen query.
How is the checkbox connected into the query? Do you append to a temporary
table? If so then include a sort-order field.
 
G

Guest

I have the DB set up now to append to a Temp Table. I added a SortOrder
field that is set to "Autonumber". The Temp Table works okay, but when I
update it, it is still picking up the order of the Query, which by default is
it's ID number, not the order in which I make choices to add items to the
query. I must not have something set up right. Thanks for your continued
help.

Kass
 
J

John W. Vinson

I have the DB set up now to append to a Temp Table. I added a SortOrder
field that is set to "Autonumber". The Temp Table works okay, but when I
update it, it is still picking up the order of the Query, which by default is
it's ID number, not the order in which I make choices to add items to the
query. I must not have something set up right. Thanks for your continued
help.

Tables

*HAVE NO ORDER*.

A table is an unordered "bag" of data.

If you want to see records sorted, you must - no option - use a Query sorting
the records by some field within the table.

John W. Vinson [MVP]
 
G

Guest

John,

Thank you for your reply. Actually I don't want to sort anything. I have a
form that I use a checkbox (SL Seed) to designate certain records I want to
work with. I use a query with "Yes" criteria for SL Seed to gather the
records I need. When I get done, I uncheck the SL Seed box on the the 10-12
records in the query, which in turn unchecks them in the main form. Then I
can go back in an gather another 10-12 records later that I need. My problem
is, I would like the query to pick up the order in which I checkmark the
boxes, in otherwords the order in which I choose the records. I know about
sorting by a field and all... my trouble is I don't want any sorting... I
want the order in which I gather the records at the time.

Any insite is appreciated.

Thanks!

Kathy
 
J

John W. Vinson

I know about
sorting by a field and all... my trouble is I don't want any sorting... I
want the order in which I gather the records at the time.

"Sorting" means displaying records in a particular order. That is the
definition of the term.

You want records displayed in a particular order ("the order in which I gather
the records at the time").

Therefore you DO want sorting.

Access neither knows nor cares in what order you checked the checkboxes. If
that information is of importance to you, you'll need to add a Date/Time field
to the table, and set its value to Now() in the AfterUpdate event of the
checkbox. You can then sort on this field.

John W. Vinson [MVP]
 
J

John Spencer

Or change the checkbox to a number field (or text field) where you can enter
the number (or a string) that specifies the order you want.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
G

Guest

Thanks John,

I decided to take your advise and change from a checkbox to a number field.
Then I can easily order them how I want and it leaves me more room for
flexibility. I found it also "cleans up" easier than the check box option
when I get done with my 10-12 records and need to capture some more. Thanks
everyone for all your help! Once again support from this site has helped me
"over the hump" on an issue I was stumped on. You all are awsome!

Kass
 

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