F
Fysh
I posted last with a problem and recieved a good answer
from Marshall. I was able to get this language to work if
I place it on the subform. However, instead of place the
up and down arrows on the subform, which would display one
for each row I would rather just have one on tha main form
to update the table. Here is the problem I have a main
form with 2 subforms when someone selects an item from the
first subform the second subform is updated to display
realted items in sequential order. What I am trying to do
is if someone creates an item give them the option of
changing the sequential order to be used for later
purposes. I hope this makes sense. Here is the code so
far:
Private Sub AttUp_Click()
Dim lngOrdNum As Long
With Me.RecordsetClone
.Bookmark = Me.Bookmark
If .AbsolutePosition < .RecordCount Then
.Edit
lngOrdNum = !Ordering - 1
!Ordering = lngOrdNum
.Update
.MovePrevious
.Edit
!Ordering = !Ordering + 1
.Update
Me.Requery
.FindFirst "Ordering = " & lngOrdNum
Me.Bookmark = .Bookmark
Else
Beep
End If
End With
End Sub
I want to place this on the main form and when someone
selects an item on the subform then presses the arrow on
the main form button have it move up in order. Can
someone assist on this? Thanks
from Marshall. I was able to get this language to work if
I place it on the subform. However, instead of place the
up and down arrows on the subform, which would display one
for each row I would rather just have one on tha main form
to update the table. Here is the problem I have a main
form with 2 subforms when someone selects an item from the
first subform the second subform is updated to display
realted items in sequential order. What I am trying to do
is if someone creates an item give them the option of
changing the sequential order to be used for later
purposes. I hope this makes sense. Here is the code so
far:
Private Sub AttUp_Click()
Dim lngOrdNum As Long
With Me.RecordsetClone
.Bookmark = Me.Bookmark
If .AbsolutePosition < .RecordCount Then
.Edit
lngOrdNum = !Ordering - 1
!Ordering = lngOrdNum
.Update
.MovePrevious
.Edit
!Ordering = !Ordering + 1
.Update
Me.Requery
.FindFirst "Ordering = " & lngOrdNum
Me.Bookmark = .Bookmark
Else
Beep
End If
End With
End Sub
I want to place this on the main form and when someone
selects an item on the subform then presses the arrow on
the main form button have it move up in order. Can
someone assist on this? Thanks