Data entered thought web form doesn't format in client app (1 Viewer)

ibujan

New member
Local time
Yesterday, 17:21
Joined
Dec 10, 2012
Messages
1
Well.. where to start. I have a web app made with access that works just fine. It is used to collect data that's mostly text, nothing fancy. For that I use web frontend hosted on office365 sharepoint servers.

When I open some record with data on the web part it formats correctly; new lines/paragraphs are showing and all is good (web_ss.png in attachment).

But when I open the same record in the client form (or try to make a report) there is no new lines (client_ss.png in attachment).

From my research I figured out it could be something to do with the way how new lines are stored (\n \r vbcrlf...). Also I have found this sample of code that is supposed to parse the records in the database and replace the troubled new line character with what access likes - vbcrlf.
Code:
Public Shared Function FormatComment(ByVal unformattedcomment As String) As String
    dim formattedcomment
    formattedcomment = ""
    dim i
    i = 1
    do while i <= Len(unformattedcomment)
        if Asc(Mid(unformattedcomment,i,1)) = "10" then
            formattedcomment = formattedcomment & vbcrlf
        else
            formattedcomment = formattedcomment & Mid(unformattedcomment,i,1) 
        end if
        i=i+1
    loop
    Return formattedcomment
End Function

I am just wondering where, and how, should I run this (presumably at the same time as running a report on client side) and if someone can explain it to me or suggest a read that explains vba in access in some detail.

Thanks in advance :)
 

Attachments

  • screenshots.zip
    41.5 KB · Views: 74

JHB

Have been here a while
Local time
Today, 02:21
Joined
Jun 17, 2012
Messages
7,732
Only a thought, what about two fields in the table, one store the data used for the web part, and one store the data used for the client side.
Then run the code as soon as a new record is put in the database.
 

Users who are viewing this thread

Top Bottom