Using views with ADO or DAO


R

Rob Wills

Hi,

I've just been tinkering with a little project of mine, looking at using
"views" to streamline a new process and came across the following anomaly.

Basically I created a view using the following:
currentproject.Connection.Execute "Create VIEW vw_Canceled as Select * From
tblCashFlowsHistorical WHERE TradeStatus = 'Canceled'"
(No rocket science here)
And after checking the results I confirmed that this worked perfectly.

Then I decided to run an action on the view in the immediate window...
currentproject.Connection.Execute "INSERT INTO tblCashFlowsHistorical_OUT
SELECT * FROM vw_Principal"

This didn’t work....

However.... This did?!?!?
Currentdb.Execute "INSERT INTO tblCashFlowsHistorical_OUT SELECT * FROM
vw_Principal"

I copied and pasted the SQL – so there’s no typos, no error messages, it
just didn’t move the records to the “Out†table as expected.

BTW I'm using Access 2007 (accdb)

Any advice would be most welcome...

Thanks
Rob
 
Ad

Advertisements


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

Similar Threads

Using ADO and DAO 3
Ado or Dao 2
DAO a ADO 0
ADO vs DAO 41
ADO/DAO Form.Recordset 7
ADO vs DAO 9
DAO/ADO Recordset Question 2
A97 DAO to A2K3 ADO 2

Top