G
Guest
I have a database to contain procedures. The main detail of the procedure is
in the main form and has an autonumber (PID)
On the subform I have an autonumber (SID) and a procedural step no (Seq) ,
the subform contains all the steps of the procedure .
Seq is automatically stepped up by 1 by using the following code :
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me![Seq]) Then
Me![Seq] = (Nz(DMax("[Seq]", "Steps", "[Pid]=" & [PID]), 0) + 1)
Else
End If
End Sub
My problem is I will need to delete, insert and move steps around. eg I can
delete a step but then the Seq no will show a gap I need to delete by
selecting it and then clicking a button OR pressing the delete key and then
fire off some code to reorder Seq without gaps.
Any ideas on this deletion to start with; or even better getting my head
round a method to insert which seems very tricky , I am desperate !!!!
in the main form and has an autonumber (PID)
On the subform I have an autonumber (SID) and a procedural step no (Seq) ,
the subform contains all the steps of the procedure .
Seq is automatically stepped up by 1 by using the following code :
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me![Seq]) Then
Me![Seq] = (Nz(DMax("[Seq]", "Steps", "[Pid]=" & [PID]), 0) + 1)
Else
End If
End Sub
My problem is I will need to delete, insert and move steps around. eg I can
delete a step but then the Seq no will show a gap I need to delete by
selecting it and then clicking a button OR pressing the delete key and then
fire off some code to reorder Seq without gaps.
Any ideas on this deletion to start with; or even better getting my head
round a method to insert which seems very tricky , I am desperate !!!!