ahhhh, that clear some things up. Very good explanation from you. I haven't even thought about making multiple records like that to add to one record. Might help me more in the future.
So basically I need to add task three times if three ppl is completing it to the completed task table.
though, now I need to rethink how I add new posts to the completed task.
This is the code I ues to add the task to completed
Code:
Private Sub knpSpara_Click()
On Error GoTo Spara_Err
Dim intAnswer As Integer
Dim strSQL As String
intAnswer = MsgBox("Underhållet utfördes av " & Me.Signatur.Column(1) & " och tog " & Me.Tid.Column(1) & "." _
, vbQuestion + vbYesNo, "Uppdarera underhåll?")
If intAnswer = vbYes Then
strSQL = "INSERT INTO tblUnderhållArkiv([UnderhållsID], [Datum avklarat], [Tid vid åtgärd], [Signatur]) VALUES ('" & Me.UnderhållsID & "','" & Date & "','" & Me.Tid & "','" & Me.Signatur & "');"
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
[Datum Planerat] = [Datum Planerat] + [Serviceintervall]
DoCmd.SetWarnings True
MsgBox "Underhåll utfört!" & vbCrLf & "Nästa underhåll åtkommer " & [Datum Planerat] & "." _
, vbInformation, "Bra jobbat " & Me.Signatur.Column(1) & "!"
Response = acDataErrAdded
Else
MsgBox "Underhållet är ej uppdaterat." _
, vbInformation, "Ångrade."
Response = acDataErrContinue
End If
Spara_Exit:
Exit Sub
Spara_Err:
MsgBox Err.Description, vbCritical, "Error"
Resume Spara_Exit
If Me.Dirty = True Then Dirty = False
Me.Lista.Requery
End Sub
If its possible someone could help me with how to sort this out, I'm guessing its requiring to make a loop or something. And that is out of my range of knowledge. Or should I take another approach?