Re: Create a numbered list that allows change in priority.



On Mon, 04 Jun 2007 14:46:31 -0700, rbedworth@xxxxxxxxxxxxx wrote:

Hello anyone/everyone,

I'm trying to set up a form/report that allows me to move an item from
one point in the list to another. For example, if the list consists
of:

Name Date Of Entry Referral
Source Change Date
1- John S. 05/05/07 ABC Facility
2. Christopher C. 05/06/07 Hamilton Hospital
3- Heather S. 05/07/07 Regional Health Center
4- Skippy M. 05/10/07 Monterey Clinic
5- Peter R. 05/12/07 Hamilton Hospital

I want to be able to move an entry up on the list, let's say because
an agency no longer needed to send a particular person, so they want
to move someone else further down the list into the discharged
person's slot.

In the example above, let's say Christopher C. is scheduled from
discharged later fromHamilton Hospital to go home; however they want
to move Peter R. into his slot. I still need the Origional Date of
Entry, but would also like to document the date of the change. This
needs to be able to work both ways (i.e. move someone from top of list
down to bottom)

The list would then look as follows:

Name Date Of Entry Referral
Source Change Date
1- John S. 05/05/07 ABC Facility
2. Peter R. 05/12/07 Hamilton
Hospital 05/11/07
3- Heather S. 05/07/07 Regional Health Center
4- Skippy M. 05/10/07 Monterey Clinic

Thanks for your help!

This is easy enough to do.
Add a field to the table
"Sequence" Number datatype Field Size Integer

Then enter a value from 1 to ? that indicates how you wish to sort the
records. Note: you don't have to consecutively number each record. All
you need do is correctly number just those records that you want to
show in a particular position. The other records can have any value as
long as it's higher than the ones you wish to sort.
Include that field in a query.
Sort the query Ascending on the Sequence field.

Base your form's record source on the query.

In a report, set the Report's Sorting and Grouping dialog to sort on
the "Sequence" field.

I've actually used this method to sort data according to a non-logical
sort order (changeable by the user).

On the form, code the [Sequence] control's AfterUpdate event:
Me.Requery

As you renumber the records, you will see them re-positioned on the
form.

If you don't care about which records are 1 through 4 and you just
wish a certain record to be #5, set that record to 1, any four other
records to 0 and all the other records to 2. That record (#1) will
display as the 5th record.
If you do need the full table sorted exactly in a certain order, then
you will need to number each record sequence accordingly. Each time
you change a record's Sequence value the entire display will re-sort.

Remember, you do not need to have consecutive numbering. You just need
the number to be the 5th value after sorting, i.e. 2, 5, 7, 9, 12,
13, 14, ... etc., Record 12 will be 5th in the list.

i hope this helps.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
.



Relevant Pages

  • Re: Calculus XOR Probability
    ... Distance and length are real numbers. ... It's a sequential set of points, that is a line of some sort, with a real ... A sequence of elements from some set X is essentially a function f: ... If you simply want to forget about infinitesimal line segments, ...
    (sci.math)
  • Re: Calculus XOR Probability
    ... Distance and length are real numbers. ... It's a sequential set of points, that is a line of some sort, with a real ... A sequence of elements from some set X is essentially a function f: ...
    (sci.math)
  • Re: MsgBox Function Explained?
    ... this in itself will stop the sequence. ... I can tie events ... First off it will have to be a form with a ListBox to display the query results ...
    (microsoft.public.access.modulesdaovba)
  • Re: What about an EXPLICIT naming scheme for built-ins?
    ... But having sortedto return a iterator ... sortedreturns a brand new sorted sequence. ... -- sorting long sequences to use only a few of the first elements. ... if you need to sort a long list to get the top 10 elements. ...
    (comp.lang.python)
  • Re: Sort collating sequence
    ... 2/ It uses two sorting modes - the sort mode of the user or another which I ... > The out of sequence use of the "_" character is probably a Microsoftism -> this lets you force a directory or filename to be sorted before> similar named ones in directory/folder views. ... NO, I don't think it's that, because the underscore is also> collated before digits, which is way out whack with ASCII. ...
    (microsoft.public.windowsxp.help_and_support)