Hi,
I have a public string variable that I pass a string to from a function. The string is not a fixed lenght. When I try to use the value stored from the public variable in another function, it chops the length of the string off. How can I pass this variable with the fixed length? The length of the string will be different each time. Below is what I have:
Here is my function where I set the public variables (strHypInfo)
The above code runs fine .. when I debug & print the string it returns the entire string ...
In my next function, I simply want a message box to return the value stored in the public variable strHypInfo. Below is my code:
when I run the above function the intial string is cut off after so many characters.
Could someone assist me with this?
I have a public string variable that I pass a string to from a function. The string is not a fixed lenght. When I try to use the value stored from the public variable in another function, it chops the length of the string off. How can I pass this variable with the fixed length? The length of the string will be different each time. Below is what I have:
Here is my function where I set the public variables (strHypInfo)
Code:
Public strHypInfo as string
Function getHypelink()
Dim frm As Form
Dim rst As Recordset
Dim totRec As Long
Dim strBookmark As String
Dim strTitle, strAdd, strNews As Variant
Set frm = Form_frmDailyEvent_NewsHyperlinks
Set rst = frm.RecordsetClone
strHypInfo = ""
rst.MoveFirst
Do
strTitle = rst!hyperlink_title
strAdd = rst!hyperlink_address
strNews = rst!news_details
If strHypInfo = "" Then
strHypInfo = "<font size = 2><a href='http://" & strAdd & "/'>" & strTitle & "</a><br>" & strNews
Else
strHypInfo = strHypInfo & "<br><br><font size = 2><a href='http://" & strAdd & "/'>" & strTitle & "</a><br>" & strNews
End If
rst.MoveNext
Loop Until rst.EOF = True
'
Debug.Print strHypInfo
End Function
The above code runs fine .. when I debug & print the string it returns the entire string ...
In my next function, I simply want a message box to return the value stored in the public variable strHypInfo. Below is my code:
Code:
Dim mystr As String
call getHypelink
msgbox strHypInfo
when I run the above function the intial string is cut off after so many characters.
Could someone assist me with this?