Domain function in Access 2000

G

Guest

I'm using Access 2000 with XP.

How can I detemine the biggest number in a text field that has both number
records and text records in it? When I use Dmax function I get the following
error "Run time error 13: Type Mismatch"
 
F

fredg

I'm using Access 2000 with XP.

How can I detemine the biggest number in a text field that has both number
records and text records in it? When I use Dmax function I get the following
error "Run time error 13: Type Mismatch"

A text field is text. Any number in a text field is still text.
Would you care to give us several examples of your actual data in the
field?
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top