Create a numbered list that allows change in priority.

R

rbedworth

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!
 
F

fredg

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.
 

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