*) Description.......: Attempts to make a field name string * Calling Samples...: fGetFieldName() * Parameter List....: tcName * Major change list.: function fGetFieldName lparameters tcName local lcStr, lcAllowedChars, lcFind lcStr = alltrim(m.tcName) lcAllowedChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + lower('ABCDEFGHIJKLMNOPQRSTUVWXYZ') + "_0123456789" lcFind = chrtran(m.lcStr, m.lcAllowedChars, space(7)) if len(m.lcFind) > 0 lcStr = chrtran(m.lcStr, m.lcFind,replicate("_",len(m.lcFind))) endif lcStr = left(alltrim(m.lcStr), 8) if asc(left(m.lcStr,1)) >= asc("0") and asc(left(m.lcStr,1)) <= asc("9") lcStr = "_"+ m.lcStr endif return m.lcStr endfunc