Update/change Dilemma

  • Thread starter Thread starter Fysh
  • Start date Start date
F

Fysh

I have a program that is used by many different places.
One of the requirements of the DB is to grade/evaluate
training requirements. I have a form which shows the
category of training with 2 subforms requirements and
requirement details. When I click on one of the
requirements it shows the details in the second subform.
The details are in sequential order. Now I need to
establish a way to allow the user to create their own
details and allow them to place them in the order they
want. My questions are how do I attempt this on a form?
I am sure I can create a form to allow them make their own
requirements with details. But I need to allow them to
place them in the order they want. Also, how do I update
the table so when they use another form or a report to go
through the training sections it will be in the order they
placed them in after making this change?

Thanks for any suggestions
 
Fysh said:
I have a program that is used by many different places.
One of the requirements of the DB is to grade/evaluate
training requirements. I have a form which shows the
category of training with 2 subforms requirements and
requirement details. When I click on one of the
requirements it shows the details in the second subform.
The details are in sequential order. Now I need to
establish a way to allow the user to create their own
details and allow them to place them in the order they
want. My questions are how do I attempt this on a form?
I am sure I can create a form to allow them make their own
requirements with details. But I need to allow them to
place them in the order they want. Also, how do I update
the table so when they use another form or a report to go
through the training sections it will be in the order they
placed them in after making this change?


The details table will have to have a ordering field to
remember the specified order so the forms/reports can use
it.

A relatively simple UI to manage the ordering field is to
have moveup and a movedown buttons (Access does't provide a
drag and drop feature). Each buttton's click event would
subtract/add one to the field in the current record and then
add/subtract one in the previous/next record. Here's some
sample air code:

Sub cmdMoveUp.Click()
Dim lngOrdNum As Long
With Me.RecordsetClone
.Bookmark = Me.Bookmark
If .AbsolutePosition < .RecordCount Then
.Edit
lngOrdNum = !Ordering + 1
!Ordering = lngOrdNum
.Update
.MoveNext
.Edit
!Ordering = !Ordering - 1
.Update
Me.Requery
.FindFirst "Ordering = " & lngOrdNum
Me.Bookmark = .Bookmark
Else
Beep
EndIf
End With
End Sub
 
Back
Top