make table query

P

Pete Rothery

I use a make table query and would like to transfer the defaults to the new
table.
Is this a brick wall? Anyway round it would be welcome!
 
T

Tom Wickerath

Hi Pete,

What exactly do you mean by "transfer the defaults to the new table"? Why
are you using a make table query? In general, I prefer to start with an empty
table of pre-defined structure, and then use an append query to add records
as needed. I have a sample that you can download that demonstrates how to do
this. The sample uses an empty table as the basis for a new table in a
temporary database.

http://www.accessmvp.com/TWickerath/downloads/tmpwrkdb.zip

Note: I have not tested this sample with any combination of Vista and Access
2007. It works fine with Win2000/XP and Access 2000/2002/2003.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
P

Pete Rothery

Hi Tom
Thanks for reply. Sorry my first post not clear. I need to transfer default
values of some fields from a structure only table to a temporary table using
a make table query. I then need to carry out check on temp table (for
duplicate clients) and then append the data in the temp table to my main
table of clients.

I have looked a the download you suggested which seems to do something
similar - but not yet sussed it out, will have a go now.
 
T

Tom Wickerath

Hi Pete,
I have looked at the download you suggested which seems to do something
similar - but not yet sussed it out, will have a go now.

This should work for you, as long as you base your append query on the table
in the temporary database, and run it before doing anything that causes the
temporary database to be closed and deleted.

Note: For Access 2007, I think you the best bet would be to change the code
so that it creates the temporary database in the same folder as the main
database, but I haven't looked into this yet.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
Top