Actually this is two table that link by TransID
tblTrans
PK TransID
RefNo
others details
tblDrawing
PK DwgID
FK TransID
CounterNo
DwgNo
others details
I have a form trans together with drawing subform
what I did is that when I enter drawing no the CounterNo should start to 1
I add the code in DrawgNo AfterUpdate
Code:
Private Sub DrawingNo_AfterUpdate()
If Me.NewRecord = True Then
Me.[CounterNo] = Nz(DMax("[TransID]", "Drawing"), 0) + 1
End If
End Sub
Sorry for the explanation I hope that you will understand what im trying to do.
Thank you