Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unterminated string constant ERROR

Status
Not open for further replies.

Kebabmeister

Programmer
Apr 22, 2003
94
0
0
GB
The code below moves files between locations and then reports activity. The code works fine in actuate but when I try to run it from the server it throws up the error "Unterminated string constant"

Any help gratefully received.

Function Fetch( ) As AcDataRow
Dim Row As DataRow1
Dim Result As Integer
Dim Filename As String
Dim ComparisonStr As String
If Row Is Nothing Then
Set Row = New DataRow1
AddRow(Row)
End If
If b_UserRequestedExit = True Then
Exit Function
End If
ExtendSearchPath(LivePath)
chdir(LivePath)
Filename = InputBox("Enter the query name to archive","Archive Query","<Query Name>")
ComparisonStr = FindFile(FileName + Extension)
If ComparisonStr = "" and Ucase(FileName) <> "QUIT" Then
Result = MsgBox("Query not found",MB_OK,"Failed Query Archiving")
ElseIf ComparisonStr <> "" Then
Result = MsgBox("Confirm Query Archiving?",MB_OKCANCEL,"Archive Query")
If result = 1 Then
Name (Livepath + Filename + Extension) As (ArchivePath + FileName + Extension)
End If
End If
If ComparisonStr <> "" Then
Row.Filename = "Archived <" + FileName + ">"
Row.WhenDone = Now
Else
Row.Filename = "Failed Archiving <" + FileName + ">"
Row.WhenDone = Now
End If
If Ucase(FileName) = "QUIT" Then
Row.Filename = "Quit Command"
Row.WhenDone = Now
b_UserRequestedExit = True
End If
Set Fetch = Row
End Function
 
I Have tracked down the problem to the line:

Filename = InputBox("Enter the query name to archive","Archive Query","<Query Name>")

Or at least that line causes the report to fail when virtually everything else is commented out, whether it is the only problem is another thing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top