Microsoft
Software
Hardware
Network
Question : How do I find the max number in a field formatted as text?
I am using the following code to try to find the highest number in a field. The problem I am having is that the field is formatted as text (nothing I can do about that) so when the "highest" number is 3666, I am getting the result of "97."
How do I get the max number in a text field as if it were actually a number field?
Thanks,
George
Code Snippet:
1: 2:
Dim maxordnum As Integer maxordnum = DMax("[ordnum])", "[srvinv]")
Open in New Window
Select All
Answer : How do I find the max number in a field formatted as text?
Dim maxordnum As Integer
maxordnum = cint(DMax("format([ordnum]
,""0000"")
", "[srvinv]"))
Random Solutions
Powerpoint VBA Find Text in Shape
see all info for table in sql server
Forefront 2010 and Windows 2008 R2 Server Core
Rollback failed XP Repair install
Backup Script for Oracle database backup
SQL2005 lost 5000 records ? Possible to recover (file to download)
ADMT 3.0 example include file
Visual Studio dataset designer error message
Problem with changing Record Source in Access
Exchange services not running shows error