Insert values automactly in tables

filduarte

New member
Local time
Today, 22:08
Joined
Nov 22, 2006
Messages
7
Hi, this is my first post in this forum... so thanks all for your answers...

Ok, the problem is this...

I've got a database with some tables, but in that database i've got 3 important tables....

Lets refer that the tables have this names [Table1,Table2,Table3];

In the Table 1, there are 3 important variables, one of them its a primary Key, ok all i wanna know how to do... its this:

When i insert a new regist in this table, the first 3 values from the first three colunns must be replicated to table2 and table3.

Can you help me PLEASE!! :(
 
a simple way to do this (without code)
is to have after update on your 3rd field 2 append qry
so
tbl1
field 1 = abc
field 2 = def
field3 =ghi after update do
append qry

append qry
will look like
field1 append to table2field1
etc

remember - with append i have just read that you should not have any key reference on your table2 and table3

you may need to tweak this but this should work gbp
 
You should not be holding the same data in three different fields. Explain why you think you need to do this.
 
Hi, first of all i would like to thanks all your posts... (GARY and NEILEG)

NEILEG ... i need that thing, because of this...

this is for a company that needs to have a database with this functions:

  • a table with all the contacts and numbers of processes

then when they pressed a button goes to another form (table2) when they just:

insert more data, but the number of the process and the name of the client appears from the first table...

this is why i want to replicate the first 3fields from the first table to the second table...

i know this is strange... but its what i wanna understand and do.

And after this when i query the database, i can query by Table1 or Table2

Can you help me?? THANKS!
 
Last edited:
No, you're wrong. You need to hold the primary key of the first table in the second table so that you can retreive the data when you need it. Your forms should be based on queries not tables for this reason (among others).
 
mmmm

Ok... so what i need to do, its connecting by a relationship the 2 tables...

Primary Key (Table1) - Table2

and then when i finish to append all the fields on table1, and press the button to go to table 2, to the same client (number), to put some more data on this table...this is suported on a query??

its what Neileg, i must do???
 
Imagine this...

2 tables... the first 3 fields of this table, when you press a button, are automactly copied to a second table... only this...

how???
 
filduarte said:
Imagine this...

2 tables... the first 3 fields of this table, when you press a button, are automactly copied to a second table... only this...

how???
Access is a relational database. You are treating it like a spreadsheet. I realise this is not the way you think this should work. I suggest you have a look at some sample databases to see how this might work in practice.
 
Ok Neileg...

but i thought that with the Sql function on Access, i could do something like that... or with VBA....


i might probably gonna use SQL and Django to do this...

:( i'm sad, with access i can't do this .... :( :(
 
Access can do this, but it is not the correct way to design your database.
 
Ok... i know that's a bad way for developing a database...

But can you close your eyes, and just for this moment say how can i do that....?

Pleaseeeeeeeeeeeeeeeeeeeeeeee :)
 

Users who are viewing this thread

Back
Top Bottom