I have some code that calls a sub to get the largest unique number from a attribute.THIS WORKS GREAT ON MY PC, but as soon as I send it over to my Trimble Juno it erros out on the msgbox....How can this work on my PC and not in the Juno????? I am besides myself right now....Why is the error occuring on a simple message box?????I then created 3 more fields in the dataset. I made them (Long integer, Double, Text) none of them worked...But they work fine on my PC....UGGGGGGGG Any thoughts?PLEASE HELP!!!!!!!
Option Explicit
Dim varLargestValue
Sub X
' Some code
Call FindLargestValue
' Show to largest value from the sub being called...
Msgbox varLargestValue
' Some Code
End Sub
Sub FindLargestValue
Dim strFileName2
strFileName2 = varAXFFileName_2
'++ open the selected AXF file
Dim pDS6
Set pDS6 = OpenAXF(strFileName2)
If (pDS6 Is Nothing) Then
Console.Print "Open DataSource failed"
Exit Sub
End If
' Set up recordset query
Dim pRS6
Set pRS6 = pDS6.Execute("SELECT MAX(UNIQUEID2) AS MaximumID FROM Outfalls")
'++ step through the records and output the first attribute to the Console window
pRS6.MoveFirst
Do While Not pRS6.EOF
MaxID = (pRS6("MaximumID").value)
pRs6.MoveNext
Loop
varLargestValue = MaxID
Msgbox varLargestValue
' Close Recordset
pRS6.Close
Set pRS6 = Nothing
End Sub