Updating Fields with Different Values? 
Author Message
 Updating Fields with Different Values?

I have a linked table (A) from a .txt file to retrieve data from a bar code
 scanner. Since this .txt file changes I have an append query to another Table

(B) to store it. I need all the changes in Table "B" Updated in Table (C)

For Example If Table "B" has:
                Item          Quantity
                beans           2
                soup             3
                soap             7

 And Table "C" already has:
                Item          Quantity
                beans           1
                soup             0
                soap             4

How do I get Table "C" to:
                Item          Quantity
                beans           2
                soup             3
                soap             7

I've written a module that cuts and pastes, looping through each record until
the end. But that seems to sloppy to me. There must be a better way.

Thanks for any help you can offer,
Al                



Sun, 17 Aug 2003 04:09:35 GMT  
 Updating Fields with Different Values?
Hi,

Bring TableB and TableC in a new query,  Join their common fields Items,
edit the join to keep all the records from TableB. Transform the select
query into an update query. Drag TableC.Quantity in the grid, in the
UpdateTo line, write:  [TableB].[Quantity]. That's all. Not only  existing
Items are updated, but if a new item is mentionned in TableB, it will be
append to TableC.

AS USUAL, make a backup if you are making tests on your real life data....

Hoping it may help,
Vanderghast, Access MVP

Quote:

> I have a linked table (A) from a .txt file to retrieve data from a bar
code
>  scanner. Since this .txt file changes I have an append query to another
Table

> (B) to store it. I need all the changes in Table "B" Updated in Table (C)

> For Example If Table "B" has:
>                 Item          Quantity
>                 beans           2
>                 soup             3
>                 soap             7

>  And Table "C" already has:
>                 Item          Quantity
>                 beans           1
>                 soup             0
>                 soap             4

> How do I get Table "C" to:
>                 Item          Quantity
>                 beans           2
>                 soup             3
>                 soap             7

> I've written a module that cuts and pastes, looping through each record
until
> the end. But that seems to sloppy to me. There must be a better way.

> Thanks for any help you can offer,
> Al



Mon, 18 Aug 2003 03:38:05 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. select box should show values from two different fields from different tables

2. COMBOBOX.BOUNDTEXT VALUE CHANGES TO DIFFERENT FIELD VALUE

3. updating a different field

4. dbSingle, dbDouble: different values from same field

5. dbSingle, dbDouble : different values from same field

6. COMBOBOX.boundText value reference change to different field?

7. comparing field values from two different access databases

8. adodb connection to excel: recordset.fields(i).value=null for fields with numeric value

9. adodb connection to excel: recordset.fields(i).value=null for fields with numeric value

10. adodb connection to excel: recordset.fields(i).value=null for fields with numeric value

11. Updating field in form from summary value in another

12. Update Field Value

 

 
Powered by phpBB® Forum Software