DMax function

D

Del

I'm trying to use the DMax function to generate the next higher number in a
text field filled with both numbers and text. My code works fine if there
are only numbers in the field, but fails with a "Run time error 13: Type
Mismatch" when there is text in the field
 
D

Del

Please excuse my blindness.

I simply need to exclude the text in the criteria. (The text records are
always "N/A". All other records are numbers)

This code works:
strNewLine = (DMax("[Line]","tblLine",[Line] <> 'N/A'") + 1)
--
Thank you,
Del


Roger Carlson said:
What does your code look like?

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 

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