mschmucker
New member
- Local time
- Today, 05:15
- Joined
- Nov 4, 2010
- Messages
- 8
I am using Access 2003. I have a database with a field "Shipper#" that I want the default value to 1 larger than the previous record. I also want to be able to override the number, sometime we will have 5 lines with the same shipper#, most rows will have a different shipper#. I have tried the following-Max("[shipper#]","tblschedule")+1 and I have tried:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(MySeqNo) Then
MySeqNo = DMax("Shipper#", "tblSchedule") + 1
End If
End Sub
What I get is 2 records with the same shipper# and then the third record increases by 1.
Any ideas one why every row does not increase in shipper#?
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(MySeqNo) Then
MySeqNo = DMax("Shipper#", "tblSchedule") + 1
End If
End Sub
What I get is 2 records with the same shipper# and then the third record increases by 1.
Any ideas one why every row does not increase in shipper#?