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
call / run / execute a javascript function on a html webpage with an vb 6 activeX on the same page
Raid 5 4x1 TB format time?
How to reference the "checked" value of a checkbox in a GridView template field
Reset Autonumbers when moving to production
PACK TABLE
Guide for Hyper-V Standard edition, preferably video?
Updating a table from VBA
Open a web page from access 2003
Terminal Server and Printing to Mutiple Locations
error with web site when it was moved from server 2003 to 2008