Hello,
This might look like little strange question but I want to display a message in msgbox with vbCrLf after retrieving the message from a table. See the code below:
In my tblSettingsServer, UpdateMsg field has the following text in it:
Note that there is no quotation mark in start and end of the value as MSA will add itself as UpdateMsg is a string variable. If we put those quotation marks in start and end of message, it makes UpdateMsg1. But problem is, UpdateMsg1 gives desired results while UpdateMsg (that is fetched by either DLookup or using recordset method) doesn't. See the attached screenshots of both the results.
Do I have to perform some other operation on UpdateMsg after fetching it from the table?
Best Regards,
Abdullah
This might look like little strange question but I want to display a message in msgbox with vbCrLf after retrieving the message from a table. See the code below:
Markdown (GitHub flavored):
Function test()
Dim UpdateMsg As String
Dim UpdateMsg1 As String
' UpdateMsg = DLookup("UpdateMsg", "tblSettingsServer", "VersionID = 1")
' UpdateMsg1 = "New version is released. Changes Includes:" & vbCrLf & "-Enhanced Security" & vbCrLf & "-Ability to add new employee"
MsgBox UpdateMsg, vbInformation, "Update Notification"
End Function
In my tblSettingsServer, UpdateMsg field has the following text in it:
New version is released. Changes Includes:" & vbCrLf & "-Enhanced Security" & vbCrLf & "-Ability to add new employee
Note that there is no quotation mark in start and end of the value as MSA will add itself as UpdateMsg is a string variable. If we put those quotation marks in start and end of message, it makes UpdateMsg1. But problem is, UpdateMsg1 gives desired results while UpdateMsg (that is fetched by either DLookup or using recordset method) doesn't. See the attached screenshots of both the results.
Do I have to perform some other operation on UpdateMsg after fetching it from the table?
Best Regards,
Abdullah
Attachments
Last edited: