How are ya oxicottin . . .
oxicottin said:
[blue]my question is how can I get all the fields in the record to move with it? [purple]The record has a PK and I know I cant move that[/purple] so can I move the fields along with the number? If so how....[/blue]
You have to keep the same PK just in case there's a depedant subform. You do however have a seperate field [blue]JobStepNumber[/blue] that you can sort by and use for tne transfer. In essence what you would be doing is swapping records (including [blue]JobStepNumber[/blue]). The steps are as follows (for the upkey ... with code in the forms [blue]OnKeyDown[/blue] event):
[ol][li]Put a question mark [purple]
?[/purple] in the [blue]
Tag[/blue] property of all the controls of interest.[/li]
[li]In the event mentioned above ... perform the following:
[ol a][li]Find the current [blue]JobStepNumber[/blue]and hold the previous [blue]JobStepNumber[/blue] or dis-allow movement if your on the 1st record.[/li]
[li]Swap records wih a do loop (including [blue]JobStepNumber[/blue]).[/li]
[li]Requery the form[/li]
[li]Find the record = the held [blue]JobStepNumber[/blue].[/li][/ol a][/li]
[li]For the down key just detect when your on the last line and perform the same in reverse.[/li][/ol]
To be sure ... this is all dependent on a query or SQL set as the [blue]RecordSource[/blue] of the form ... sorted by [blue]JobStepNumber[/blue].
[blue]Your Thoughts? . . .[/blue]
See Ya! . . . . . .
Be sure to see thread181-473997 [blue]Worthy Reading![/blue]
![[thumbsup2] [thumbsup2] [thumbsup2]](/data/assets/smilies/thumbsup2.gif)
Also faq181-2886 [blue]Worthy Reading![/blue]
![[thumbsup2] [thumbsup2] [thumbsup2]](/data/assets/smilies/thumbsup2.gif)