Thanks Ajax for all your help!
I've been testing the forms and it works well except there can be one a little user problem that can be encountered. That is when the user selects "NCR" then "NCR" vice versa, the form
will dmax the next number on that form. I want to prevent this so I only allowed Me.Newrecords = true. The code looks like this below:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord = True Then
Me.NCRNumber = Nz(DMax("[NCRNumber]", "tblNCR", "[NType]='" & NType & "'"), 0) + 1
End If
End Sub
Now.. this works well except if I change "NCR to "CDR" on an old record, it will not read the dmax of "CDR" because it's not a new record. What code can I add to error-proof the "NCR" to "NCR" dmax or "NCR" to "CDR" vice versa dmax.
Thanks!