I work in a manufacturing environment. We have several departments that each
have several lines of mfg equipment. Each line is identified with a number,
i.e. the surface mount department has 4 lines of equipment and these lines
are called 1, 2, 3, & 4. I am building a database application to track the
scheduled maintenance on all this equipment. One of my tables contains a
list of all the departments and any lines associated with them. So, when I'm
entering a new piece of equipment I can select the appropriate line to help
ID that equipment. When we add a new line I want my code to add 1 to the
biggest number associated with that department to generate the new line
number. This would work fine if I didn't need to add "N/A" to the list for
pieces of equipment in these departments that are not assigned to a line.
It's the N/A that causes the error (mentioned in my first post) when I use
DMax function to find the biggest number.
Here is an example of the data in the two fields in the table.
Dept Line
SMT N/A
SMT 1
SMT 2
SMT 3
SMT 4
AI N/A
AI 1
AI 2
AI 3