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
Dropdownlist change, does not change textboxes
Convert Sprite Sheets to Animations
Need Assistance Selecting Web Authoring Tool
DBNETLIB][ConnectionOpen(C<wbr />onnect()).<wbr />]Specified<wbr /> SQL server not found. MADNESS
Excel: Conditional formatting checking for unequal cells in portions of 2 wksts
vb.net - if string
cannot delete shared calendar items in OWA exchange 2007
How do I convert a string with commas into a double?
Replace SBS Server 2003 SATA RAID hard drives with bigger ones
SQL String error. 'Too few parameters. Expected 1.'