copy column from 1 table to another PLEASE HELP!!!

M

marc

I am fairly new to ACCESS and I am not sure if this is
even possible but I am going to ask anyway. I have a
table with various columns and information in it. One of
the columns is called "AI". They are numbered from 0001
thru what ever. I have another column called item number
which is autonumbered. I have another table with the
same 2 column titles in it. My problem is that I want to
be able to have this table update the AI number as it is
entered because this information needs to coorespond with
the AI number.

Below is an example of what I have right now.
Table 1
Item number AI
1 0001
2 0002
3 0003
4 0004

Table 2
item number AI task 2a title
everything I enter looks like:
1 adklfjajf
2 lkjfalfjasdfa

I would like to get table 1's AI numbers to autmatically
show up in the AI column for table 2.

I have created a Querry and I get my information to show
up there but I need to get the AI information to show up
into Table 2 in order for my form to work properly.

Please help
 
T

Tim Ferguson

I have created a Querry and I get my information to show
up there but I need to get the AI information to show up
into Table 2 in order for my form to work properly.

No you don't: there are many ways to get the AI number to show up on your
form. You can use a textbox with its ControlSource set to a DLookup()
function, or (better) you can base the form on a query that selects data
from both tables.

Either method is infinitely better and easier to manage than trying to keep
two separate tables in step with each other.

In the end, would it not be easier to put the AI number into the other
table and scrap the first one?

All the best


Tim F
 
M

marc

It would be easier to just use one table if I could. But
the information that is wanted fills up the first table
and this is why I have a second table. So There is no way
to automatically set something up that will populate the
AI field of the table. I have the querry set and that
works fine. But the form wants to place the information to
the table and not the querry for some reason. That is
where everything is messed up. I need to have the two
tables stay in sink so that the information stays with
their particular AI numbers.
 
T

Tim Ferguson

I have the querry set and that
works fine. But the form wants to place the information to
the table and not the querry for some reason.

Can you post the SQL view of this query? Remember that queries are only
connections to the data in the tables; nothing gets "placed" in a query. It
may be that adjusting the query will allow the data to find its way back
into the right fields.
It would be easier to just use one table if I could. But
the information that is wanted fills up the first table
and this is why I have a second table.

I think you mean that table One is a data import from some other source. It
should not be too hard to create a routine that would take the data from
that and use it to update the second table.

B Wishes


Tim F
 

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