0
 sz = sz & "{Rework Tag 2of2~`txtSeqNum~V" & rs!ChargeSeq & "~`"
 sz = sz & "txtLengthFt~V" & Format(rs!bloomlength \ 12, "00") & "~`"
 sz = sz & "txtLengthIn~V" & Format(rs!bloomlength Mod 12, "00") & "~`}"

I ran across the code above and was wondering what are the symbols "{" , "~`", and "~" are used for? I know that "{" is used in VBA for arrays, perhaps this is similar?

Obfuscated
  • 311
  • 2
  • 15
  • Are you querying a PostgreSQL database? http://stackoverflow.com/questions/12452395/difference-between-like-and-in-postgres – Marc Apr 19 '16 at 13:01
  • I think I may have found the answer...It looks like it is writing an input file for another program that prints to a laser printer. That other program will parse the input between the ` and the ~ in some ways. The ~`txtSeqNum matches to a label format instruction and the ~V ... ~ matches to the contents – Obfuscated Apr 21 '16 at 10:10
  • Thanks for the link Marc. Very interesting reading. I've never dealt with PostgreSQL. – Obfuscated Apr 21 '16 at 10:13

1 Answers1

1

I may be stupid, but I think these dont have any special meaning.

sz = sz & "some string with funny things" & moarfunstuff & "stringstuff"

In the end, sz still is a primitive string. Perhaps these symbols have a special meaning somewhere else, but not in the VBA-Code you presented.

As others pointed out, sz could become a string to store information about fields in a database with.

krysopath
  • 324
  • 4
  • 9
  • This is SQL not VB or VBA. I just used VBA as an example of what I've seem the symbol used for. – Obfuscated Apr 19 '16 at 12:22
  • @Obfuscated - Sorry, your example is clearly VB/VBA and in this context these symbols mean nothing. For T-SQL those symbols mean nothing either. If you think that there are some special symbols in use, tell us, where and how this sz variable is used. – Arvo Apr 19 '16 at 12:30
  • 1
    Please accept my apology. This is VB. It contains returns from a SQL query (rs!ChargeSeq & rs!bloomlength) which miss-led me. It looks like the VB is writing to text file. With that in mind, does the symbols make any sense now? – Obfuscated Apr 19 '16 at 13:40
  • It depends on the program consuming the textfile - maybe there is the reason. – nabuchodonossor Apr 20 '16 at 06:33
  • It depends which database engine you are using. – MarkJ Apr 20 '16 at 11:44