T
tighe
all,
i am looking for a way in an update query to variably select the field that
will be updated in the table. the infomation will always be from the same
control on a form but depening on a combo box "type" a different field will
need to be updated.
I have tried this two ways.
One to use an multi iif statement in the fileld selection:
IIf([Type]="Branch",[Branch],IIf([Type]="k1",[k1]... this kept returning
errors: not a valid name, invalid characters or punctuation or too long, the
field is too small( this is when i added the form reference for type,
"[Forms]![edit_process]![Type]=")
two have the criteria for each field from the table i might update to have a
criteria for itself similar to the above in the hopes that the field would
only be updated if the criteria was met. this didnt work at all because, of
course, that is not how an update query works.
of course these were just my ideas for a solution and hope that i'm not
wasting time with a double post, couldn't find anything similar to this
situation i would prefer not to have a different query for each "Type"
instead would just keep each field through the process, letting my users see
the Type they are working on.
Thanks for all the help past and present.
i am looking for a way in an update query to variably select the field that
will be updated in the table. the infomation will always be from the same
control on a form but depening on a combo box "type" a different field will
need to be updated.
I have tried this two ways.
One to use an multi iif statement in the fileld selection:
IIf([Type]="Branch",[Branch],IIf([Type]="k1",[k1]... this kept returning
errors: not a valid name, invalid characters or punctuation or too long, the
field is too small( this is when i added the form reference for type,
"[Forms]![edit_process]![Type]=")
two have the criteria for each field from the table i might update to have a
criteria for itself similar to the above in the hopes that the field would
only be updated if the criteria was met. this didnt work at all because, of
course, that is not how an update query works.
of course these were just my ideas for a solution and hope that i'm not
wasting time with a double post, couldn't find anything similar to this
situation i would prefer not to have a different query for each "Type"
instead would just keep each field through the process, letting my users see
the Type they are working on.
Thanks for all the help past and present.