hi,
i'm trying to simply / uniform my vb code a little and was wondering if the below is possible.
i'm using a different controls which are linked to strings. the stings are used in a query.
for instance i have a textbox (control name COUNTRY_1) which triggers a sting (called COUNTRY) to update on change.
so now i'm using a "if then" statement like
if Left(ctr.Name, (L - 2)) = "COUNTRY" then COUNTRY = ctr.txt
since i'm using a few more textboxed (i.e. query on resource, or unit name, etc.) is have a couple of if then statements more in the code.
i was wondering if i could not use the (ctr.Name, (L - 2)) string to update the COUNTRY text. So something like:
string(ctr.Name, (L - 2))= ctr.text or
variant(ctr.Name, (L - 2))= ctr.text
a little bit the same as ctr(name_from_variable).value = bla bla but then for a string
Thanks for some sugestions
Patrick
i'm trying to simply / uniform my vb code a little and was wondering if the below is possible.
i'm using a different controls which are linked to strings. the stings are used in a query.
for instance i have a textbox (control name COUNTRY_1) which triggers a sting (called COUNTRY) to update on change.
so now i'm using a "if then" statement like
if Left(ctr.Name, (L - 2)) = "COUNTRY" then COUNTRY = ctr.txt
since i'm using a few more textboxed (i.e. query on resource, or unit name, etc.) is have a couple of if then statements more in the code.
i was wondering if i could not use the (ctr.Name, (L - 2)) string to update the COUNTRY text. So something like:
string(ctr.Name, (L - 2))= ctr.text or
variant(ctr.Name, (L - 2))= ctr.text
a little bit the same as ctr(name_from_variable).value = bla bla but then for a string
Thanks for some sugestions
Patrick