473,325 Members | 2,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

updating/adding to another table

Hi,

I'm working with access and sql server.
I have two tables.
Fields in table #1: barcode
(unique),transfer_to,quantity_of_items,supplier,pr ice,date_of_shipment
Fields in table #2: barcode (unique),transfer_to(unique),quantity_of_items
The first table is updated manually using a form, and the second should be
updated by the form itself
at the end of each record.
Note: in table #2, "barcode" and "transfer_to" fields are unique.
At the end of entering a record in table #1, if "barcode" and "transfer_to"
fields exists in table #2,
I want that the "quanity_of_items" field in table #1 will be added to those
in table #2. But if "barcode" and "transfer_to" does not exist in table #2,
I want that a record will be added with the same data
(barcode,transfer_to,quantity_of_items).
How can this be done in access/sql ?

Thanks.
Nov 12 '05 #1
1 1310
Whew!
That's a lot of cross-posting you're doing there!
It's usually considered appropriate to limit cross-posts to 2 or 3 groups.

As for your question -
is there some reason you need to keep table 2 data in a separate table?
It seems to me you could use a query (or view in SQL Server) to retrieve
this information from Table 1 on an "as needed" basis.

HTH
- Turtle

"Marius Kaizerman" <ma****@kaizerman.org> wrote in message
news:ne********************@lnews.actcom.co.il...
Hi,

I'm working with access and sql server.
I have two tables.
Fields in table #1: barcode
(unique),transfer_to,quantity_of_items,supplier,pr ice,date_of_shipment
Fields in table #2: barcode (unique),transfer_to(unique),quantity_of_items
The first table is updated manually using a form, and the second should be
updated by the form itself
at the end of each record.
Note: in table #2, "barcode" and "transfer_to" fields are unique.
At the end of entering a record in table #1, if "barcode" and "transfer_to" fields exists in table #2,
I want that the "quanity_of_items" field in table #1 will be added to those in table #2. But if "barcode" and "transfer_to" does not exist in table #2, I want that a record will be added with the same data
(barcode,transfer_to,quantity_of_items).
How can this be done in access/sql ?

Thanks.

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data...
5
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for...
2
by: Colm O'Hagan | last post by:
Hi there, I having a problem with a database I'm setting up, I would be delighted if someone out there could help. The database I'm setting up is a task register datebase, it will be used to...
1
by: travismorien | last post by:
I have four tables of different "entities". One table contains information for "people", one for "trusts", one for "companies" and one for "self managed super funds". Each type of entity has an...
4
by: Cyberwolf | last post by:
I have a form that users enter information into. What I want to do is to update certain fields from another table once they have entered a number in a field. The form is already based on a query...
3
by: wvmbark | last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months. Every day we...
2
by: tomash | last post by:
Hi! I ve got two tables in Access 2007. I want to update a field of DataTable from another table, DataSumTable when two of their fields equals. ( the fields : Name and Period) I tried this...
4
by: slavisa | last post by:
Im having trouble with updating my 1 table with the information from another! I have a table with 6 fields. Code(pk), Name, Title, Address, State, city, zip the table is called Info. Now...
0
by: aRuaL | last post by:
Hi all, i have a problem with updating the junction table. I am doing this access project after learning for 2 weeks so pardon me if what the question im asking is really simple. Firstly i have 3...
5
by: rammudali | last post by:
Hi all, i have a db where i maintain document controlling. In the main form i am updating all the relevant fields(by qry- two tables i to many). for certain reason after updating a particual...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.