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
DateTime Group By question
File saving problem in Office 2007
Connect to an XP PC with Windows 7
Assistance with Windows Forms and calendar control embedded inside a grid
Join unrelated tables
Cannot use Remote Desktop connection on Windows 2000 server
Unable to change the size of the page file
$INSERT permission denied on object 'TABLE NAME', database 'ACB', owner 'dbo'. sp_ABC
Access Report export question: DoCmd.OutputTo can't export Excel 1997-2003 format?
Storing a web page's data stream in a string