Change the value in a table field based on the value of another fi

G

Guest

I have an import table that imports the following fields:
Invoice Date Trans Type Amount

I need to change the value of the Invoice field from whatever it started
with to "Beginning Balance", but only when the Trans Type field is equal to
"DI" (this is only once for each account of this type, we work with three
different account types). Is there an easy way to do this without having to
break the table down into multiple queries? Can this be done upon importing
the data?
 
D

David Lloyd

Nicholas:

If I understand you correctly, the following might work:

UPDATE MyTable
SET Invoice = 'Beginning Balance'
WHERE [Trans Type]="DI"

I do not know exactly how you are importing, but in general, there is no way
to transform data directly on import in Access.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


in message I have an import table that imports the following fields:
Invoice Date Trans Type Amount

I need to change the value of the Invoice field from whatever it started
with to "Beginning Balance", but only when the Trans Type field is equal to
"DI" (this is only once for each account of this type, we work with three
different account types). Is there an easy way to do this without having to
break the table down into multiple queries? Can this be done upon importing
the data?
 
J

John Vinson

I have an import table that imports the following fields:
Invoice Date Trans Type Amount

I need to change the value of the Invoice field from whatever it started
with to "Beginning Balance", but only when the Trans Type field is equal to
"DI" (this is only once for each account of this type, we work with three
different account types). Is there an easy way to do this without having to
break the table down into multiple queries? Can this be done upon importing
the data?

If I'm understanding, this should be a simple, single Update query:

UPDATE yourtable SET [Invoice] = "Beginning Balance" WHERE [Trans
Type] = "DI";

Am I missing something?


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top