Hi,
I have an access table that has many fields, but the three I'm concerned with are:
Field 1 - Program Number (Field 2 + Field 3 combined)
Field 2 - Load Center (3 digit number)
Field 3 - Sequence Number
The following is how the new sequence number is created:
Code:
ExistingSequenceNmbr = DMax("SequenceNmbr", "ProgramInfoTbl", "LoadCenter=" & Me.cbo_LoadCenter & "")
NewSequenceNmbr = ExistingSequenceNmbr + 1
My issue is with the sequence number fields. For certain load centers, there are sequence numbers such as
0999
1000
1781
For this, if there is a 0 in front oft he number, this is what is taken as the maximum sequence number. If there is no zero (so it'd just be 999) then it uses the 1000 as the maximum number. The issue is that it never actually grabs the highest number in there... can anyone help me try to figure out why this is not working?? I would greatly appreciate it as I have no idea what the issue is... Thank you!!