Move records up or down on continuous form

aldeb

Registered User.
Local time
Today, 14:49
Joined
Dec 23, 2004
Messages
318
I have a form (continuous) that is a page on another form. This form is used to type in parts and descriptions.
What I want to be able to do is move part # (records) up or down on the form. Does anyone have any code
or advice on how to accomplish this?
 
You would have to do something with the "Order by" somehow to re-allocate the records.
 
not easy, since the recordset determines the order - ive sen this done by storing a real number in the table for sequencing purposes

so you start with sequence

1
2
3
4

so to move 4 , above 3, you need to set its sequence beween 2 and 3, so you set to 2.5and now you get

1
2
2.5 (old 4)
3

but its not easy, as you need to read the previous item to get its sort sequence, which needs use of recordsetclone, or recordset processing etc
 
Sound like you might be on to something. I have added an OrderBy field to the table
that this form populates. Each Part number that is added is tied to an ECN number. Is
there anyway to have this OrderBy Field for each ECN number automatically add a number
starting with 1. Say I add 10 parts to the table via this form. I would like for the OrderBy
Field to number them 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 etc. Then I could change the Order on
the Form and reorder the parts order. I know I can do this with a query and Re-Query.
How could I do this with a table?

Thanks for all help.
 
This looks like some kind of order form...
You could use order-line-number to get the sequence you want.

Be carefull adding numbers to numbers tho...
1 + 1 = 11
1 + 2 = 12
1 + 9 = 19
2 + 1 = 21
1 + 10 = 110

If you order by the last field that is what will happen..... if you are not carefull that is...
 
Lets say I have a priority field on the form. How would I get the Form to re-order the
parts if I change the priority field? Say I have the following:

Pri Part#
1 12345678
2 23456789
3 34567890

If I change the 3 to a 2 and the 1 to a 3 how would I get the order to change on the
form? If the Form was based on a query I could requery but the form is populating a
table so how could I change the order based on the Priority Field?
 
Lets say I have a priority field on the form. How would I get the Form to re-order the
parts if I change the priority field? Say I have the following:

Pri Part#
1 12345678
2 23456789
3 34567890

If I change the 3 to a 2 and the 1 to a 3 how would I get the order to change on the
form? If the Form was based on a query I could requery but the form is populating a
table so how could I change the order based on the Priority Field?

If you have a query like
Code:
 Select * from Table order by Table.Pri
and use that for your form everything will work as it does now but you will be able to requery after you change the pri field.

It is always good practice to base forms/reports on a query even if all the data comes from 1 table
 
Make a "re-sort" button to "requery" your form
 
How about using the built in sorting capability of Access? Right click on the field and select "sort ascending".

Or you could do a refresh in the update event for that field.
 
i only copied this idea from a previous suggestion i saw on this site, which was fully implemented with demo code - try searching for it
 

Users who are viewing this thread

Back
Top Bottom