C
cemjs via AccessMonster.com
I have two tables, In one table I have a CaseNumber Field (which is test). In
the second table I have a LeadNumber field (which is a number field).
On my Main Form I have the CaseNumber Field and in a subform I have the
LeadNumber Field. When adding a new record (new lead) I am trying to get the
lead number to auto update to next number using DMAX) , but must reset to 1
for each new case number. This is what I have been working with.
If Nz(Me.LeadNumber, 0) = 0 Then
Me.LeadNumber = Nz(DMax("leadnumber", "tbllead", "agencycasenumber="" & Forms!
[frmMain].agencycasenumber &"""), 0) + 1
Resets the leadnumber to 1 for each new case, but does not allow to add the
next number.
the second table I have a LeadNumber field (which is a number field).
On my Main Form I have the CaseNumber Field and in a subform I have the
LeadNumber Field. When adding a new record (new lead) I am trying to get the
lead number to auto update to next number using DMAX) , but must reset to 1
for each new case number. This is what I have been working with.
If Nz(Me.LeadNumber, 0) = 0 Then
Me.LeadNumber = Nz(DMax("leadnumber", "tbllead", "agencycasenumber="" & Forms!
[frmMain].agencycasenumber &"""), 0) + 1
Resets the leadnumber to 1 for each new case, but does not allow to add the
next number.