Literal vb in text field...

cheuschober

Muse of Fire
Local time
Today, 00:25
Joined
Oct 25, 2004
Messages
168
Curious problem today.

Working on the old international postal db again wanted to include a way to force automatic formatting of the various fields that go into creating a mailing address (Name, address1, address2, city, state/province, postal code, country).

I have a country lookup table (lkupCountry) that stores country infor like the country name in a text field. In another text field, my regular expression exists where I can test postal codes based on the country before allowing entry into the db. I had the bright idea to maybe attempt another field in the same table that could hold formatting information (which mailing address part goes where) but the only way I can think to do that at this point is write variables into this new PostalFormat field (like "NrArArC, S PrO" where N = Name, r=vbCrLf, etc) and then replace those variables with the values for any given address.

The only issue I'm having is how to get line breaks into there. As it stands I would be placing "vbCrLf" directly in my text instead of triggering the desired carriage return linefeed. Of course, this also seems to me like the REALLY long way around this, so, if anyone has any bright ideas -- those would also be appreciated.

Sincere regards,
~Chad
 

Users who are viewing this thread

Back
Top Bottom