Need help to create table programmatically (1 Viewer)

Dominic1980

Registered User.
Local time
Today, 12:52
Joined
Dec 6, 2005
Messages
26
Hi

I need help to create a table programmatically in access. I have 2 tables. For e.g.

Table A
Field1 Field2
abcde 12345
bbbbb 54321

and Table B
Field1 Field2
abcde 99887
bbbbb 76543

As you can see Field1 of both tables are the same. I just need to create a Table Table C such that

Table C
Field1 Field2 Field3
abcde 12345 99887
bbbbb 54321 76543

Can this be done using a macro? Thanks so much in advance
 

locomotion

Registered User.
Local time
Today, 14:52
Joined
Dec 7, 2005
Messages
25
Use a relationship on a 1 to 1 basis

To do this go to tools > relationships

select the fields you want to be the same and join them up in form C using a 1 to 1 relationship rather than a 1 to many

Hope this helps

also if field 3 on table C is the same as field 2 on table B I would suggest making a relationship with that as well

/locomotion

P.S. I would personally avoid using macros if I were you, use code wherever possible, it will save you a lot of hardship!
 
Last edited:

Dominic1980

Registered User.
Local time
Today, 12:52
Joined
Dec 6, 2005
Messages
26
Thanks so much locomotion.... :D I'm new to vba code. So kinda struggling with my project now... am on internship btw.
 

ScottGem

Registered User.
Local time
Today, 00:52
Joined
Jun 20, 2005
Messages
1,119
Why create a table? A query can do this very easily. Just join on Field 1, Include Field 1 from one table and field 2 from the other tables.
 

Dominic1980

Registered User.
Local time
Today, 12:52
Joined
Dec 6, 2005
Messages
26
create several graphs and export to ppt

Thanks guys for your help... BTW does anybody know how to create multiple graphs in access and export them to a new powerpoint presentation?
 

raskew

AWF VIP
Local time
Yesterday, 23:52
Joined
Jun 2, 2001
Messages
2,734
Hi -

It'd probably be beneficial to you--in terms of receiving responses--to open a new thread re graphs/Powerpoint since your last question has nothing to do with the initial topic (...create table programmatically).

Bob
 

Users who are viewing this thread

Top Bottom