F
Frank
One of my favorite functions in the old Dbase program was the "macro
substitution" function (it was &). To quote the reference manual "This
function is used to obtain the contents of a character memory varaible when
dBase expects a literal value rather than a character expression."
It enabled you to use a memory variable for a field name. For instance, if I
had a table with a field named "Jones", I could access that field (for
editing, etc) by using a memory variable whose value was "Jones." In Visual
Basic syntax it might look like rsNames(strLastname) = 1 (where rsNames has a
field called "Jones" and the variable strNames has a value of "Jones"). I
tried using chr(34) around the variable, but that did not work.
I cannot find a similar function in Visual Basic. And would like to know how
I can accomplish the same result.
substitution" function (it was &). To quote the reference manual "This
function is used to obtain the contents of a character memory varaible when
dBase expects a literal value rather than a character expression."
It enabled you to use a memory variable for a field name. For instance, if I
had a table with a field named "Jones", I could access that field (for
editing, etc) by using a memory variable whose value was "Jones." In Visual
Basic syntax it might look like rsNames(strLastname) = 1 (where rsNames has a
field called "Jones" and the variable strNames has a value of "Jones"). I
tried using chr(34) around the variable, but that did not work.
I cannot find a similar function in Visual Basic. And would like to know how
I can accomplish the same result.