Users are reporting cases where two identical 'SEQ' numbers are being assigned to different records.
This occurs when more than one user has the form open to create a new record. My Form_afterupdate code is below:
If Me.NewRecord Then
Me.FY.Value = CLng([FY])
Me.Seq = Nz(DMax("Seq", "tblWA", "[FY]='" & Me.FY & "'"), 0) + 1
Any tips on ways to keep this from happening?
I already have an autonumber field so I know the records are not a duplicate, but for the purposes of this database the customer doesnt want any record to share the 'Seq' field. The 'Seq' field is of type Number in the underlying table.
This occurs when more than one user has the form open to create a new record. My Form_afterupdate code is below:
If Me.NewRecord Then
Me.FY.Value = CLng([FY])
Me.Seq = Nz(DMax("Seq", "tblWA", "[FY]='" & Me.FY & "'"), 0) + 1
Any tips on ways to keep this from happening?
I already have an autonumber field so I know the records are not a duplicate, but for the purposes of this database the customer doesnt want any record to share the 'Seq' field. The 'Seq' field is of type Number in the underlying table.