Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changeto query: using field name

Status
Not open for further replies.

needInfo25

IS-IT--Management
Jan 12, 2007
17
US
Is it possible to perform a changeto query and use a field name? For example, changeto (100 x [FieldName])? If not, what else should I be using?
 
Normally, an 'example element' is used. These start with an underscore to identify them.

You might have something like:
Code:
var
  stFldName    string
  qbe          query
endvar
stFldName="field to get change value from"

qbe=query

    tablename.db | ~stFldName   | subjectfld      |
                 | _join        | changeto _join  |

endquery

Note the tilde before 'stFldName' in the query. This allows you to use a string variable in the query image - even for field names.

So, rather than try to reference the field name, I would declare the field name with a variable, and simply ALWAYS use the same _join to identify the field containing the data/values you wish to reference from another field.

Tony McGuire
"It's not about having enough time; we have the rest of our lives. It's about priorities.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top