Current Module Script said:Public Function reduceit(strIn As String) As String
'this breaks up long titles into shorter portions to fit on label design
'without this the design breaks in middle of words
If Len(strIn) < 35 Then
reduceit = strIn
Else
Dim export_string As String
Dim n As Long
n = 35
Do While Mid(strIn, n, 1) <> " "
n = n - 1
Loop
export_string = Mid(strIn, 1, n)
reduceit = export_string
End If
End Function
Public Function secondline(strIn As String) As String
Dim reducit As String
'This breaks up the title field to create the second line of text
If Len(strIn) > 35 Then
Dim n As Long
n = 36
Do While Mid(strIn, n, 1) <> " "
n = n - 1
Loop
reducit = Mid(strIn, 1, n)
Dim A As String
A = Len(reducit)
Dim B As String
B = A + 1
export_string = Mid(strIn, B)
secondline = export_string
Else
End If
End Function
My query field headings look like
Current Query Field Heading said:Project Title line one: reduceit([DSC]![FolderTitle])
It's been working wonderfully for all this time. Now instead of the broken up strings of text that I can import into my label software my field results only show as #Error when I run it as Select Query. When I run it as a make-table query I get a "type conversion error".
I've verified that the field lengths and types all match so I am totally stumped as to why this is no longer working.
Any and all help will be GREATLY appreciated.
Thank you,
C.