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"
> 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?

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Del - 20 Dec 2005 18:50 GMT
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

Signature
Thank you,
Del
> > I'm using Access 2000 with XP.
> >
[quoted text clipped - 5 lines]
> Would you care to give us several examples of your actual data in the
> field?
Del - 20 Dec 2005 19:31 GMT
Please excuse my blindness.
I simply need to exclude "N/A" in the criteria

Signature
Thank you,
Del
> > I'm using Access 2000 with XP.
> >
[quoted text clipped - 5 lines]
> Would you care to give us several examples of your actual data in the
> field?