Solved Use non standard characters in text (1 Viewer)

PaquettePaul

Member
Local time
Today, 10:19
Joined
Mar 28, 2022
Messages
107
A user can select 1 to 4 airports that the pilot visited. Currently, I store “AirportID to AirportId to AirportId (xx nautical miles)” in the flight event notes field where xx is a calculated number based on lat/long of each airport. What I was wondering is whether an arrow symbol instead of “to” can be stored and then displayed on the screen and reports. Not sure which arrow to use, but maybe ascii 10132 or 10142. Why would I want to do this - visually more intuitive maybe.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 10:19
Joined
Feb 19, 2002
Messages
42,970
Don't store multiple pieces of data mushed into a string. Always store data in discrete fields. Then you can do whatever you want with it without having to parse it later.

If you use Rich text, you can embed special characters, they may or may not display properly. You'll need to test it.

Otherwise, when you need to print the data, concatenate it at that point.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 14:19
Joined
Feb 19, 2013
Messages
16,553
I would check which font you are using - for many fonts chr(187) gives you »
for some others chr(155) gives you ›

or just use the standard greater than >

to mix fonts in a single text box you will need to use a memo field with richtext
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 10:19
Joined
May 21, 2018
Messages
8,463
This works pretty well.
Code:
Public Function replaceTo(strIn As String) As String
  Dim line As String
  line = Chr(151) & Chr(187)
  replaceTo = Replace(strIn, " to ", line)
End Function
 

PaquettePaul

Member
Local time
Today, 10:19
Joined
Mar 28, 2022
Messages
107
Pat, yes, I agree with the standard practice re distinct data items. In this case, it happens probably one in 30-40 flight events where the student is doing a cross country flight and there is no need to ever interrogate based on an airport. I would have put the starting and ending airports at the flight segment level but in most cases, there is only one airport - student goes up, does stuff, and comes back down.

So, more economical and practical to put at notes for flight header - just because something can be done does not always mean it should. It is more a historical record of where the student flew and the distance. And yes, I am sure someone could make a case for storing each field and rebuilding the string and attaching that to other notes at time of print, but it seems like a lot of work for no gain to me at this point. Good point though.

I am not trying to parse the data to replace something, I have a pop up form that gathers the data and then updates the field. I would just prefer to use arrows instead of “to” between the airport identifiers when I concatenate all the data together before updating the field. If this is problematic, I might do the quick and dirty solution of using the > or the slash character between the airport ids as CJ suggested. Will try the other points such as rich text though first.

Thanks guys
 

Users who are viewing this thread

Top Bottom