how to import into an excel template without overwriting

N

Nathan

Not sure if two questions are allowed in one post, but here it goes!

1) I have created an excel template with several spaces into which I want to
import data from MS Acess database. The amount of rows used would be of
varying length each time, as the database is updated. I want to set it up so
that when the data is imported, it will not overwrite the existing template
with the extra data, but instead will insert new rows, and "push" the lower
parts of the template down further on the page.

2) Also, in setting up my query, I have two criteria cells in which the same
datum CAN be (but not always IS) located. I want to tell the query to return
ALL of the records that contain same datum in EITHER cell, but ONLY those
records. Is this possible?
 
P

Piet Linden

Not sure if two questions are allowed in one post, but here it goes!

1) I have created an excel template with several spaces into which I wantto
import data from MS Acess database.  The amount of rows used would be of
varying length each time, as the database is updated.  I want to set itup so
that when the data is imported, it will not overwrite the existing template
with the extra data, but instead will insert new rows, and "push" the lower
parts of the template down further on the page.

2) Also, in setting up my query, I have two criteria cells in which the same
datum CAN be (but not always IS) located.  I want to tell the query to return
ALL of the records that contain same datum in EITHER cell, but ONLY those
records.  Is this possible?

2) SELECT... FROM.... WHERE FieldA = Forms![MyForm]!
[ControlName1OnForm] OR FieldB = Forms![MyForm]![ControlName1OnForm];

1) You could use the CopyFromRecordset method... I think there's an
example on www.mvps.org/Access. Also check Ken Snell's website.
 
K

Ken Snell

Not sure if two questions are allowed in one post, but here it goes!

1) I have created an excel template with several spaces into which I want
to
import data from MS Acess database. The amount of rows used would be of
varying length each time, as the database is updated. I want to set it up
so
that when the data is imported, it will not overwrite the existing
template
with the extra data, but instead will insert new rows, and "push" the
lower
parts of the template down further on the page.

2) Also, in setting up my query, I have two criteria cells in which the
same
datum CAN be (but not always IS) located. I want to tell the query to
return
ALL of the records that contain same datum in EITHER cell, but ONLY those
records. Is this possible?

2) SELECT... FROM.... WHERE FieldA = Forms![MyForm]!
[ControlName1OnForm] OR FieldB = Forms![MyForm]![ControlName1OnForm];

1) You could use the CopyFromRecordset method... I think there's an
example on www.mvps.org/Access. Also check Ken Snell's website.
 

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