sql - Excel VBA ADO query to microsoft access returning more records than expected -



sql - Excel VBA ADO query to microsoft access returning more records than expected -

my excel/vba ado query returning more records expect.

when run query manually in ms access, shows 59 records correct. when run import excel using vba, imports 234 records. doing wrong?

this code i've used:

function datapath() string datapath = thisworkbook.path & "\" & "spaceopt.accdb" end function function getaccessconnection() adodb.connection set getaccessconnection = new adodb.connection getaccessconnection.open "provider=microsoft.ace.oledb.12.0;data source=" & datapath & ";" end function sub getdatafromaccess() dim adoconn adodb.connection, adocomm adodb.command, adors adodb.recordset set adoconn = getaccessconnection set adocomm = new adodb.command adocomm set .activeconnection = adoconn .commandtext = "select * [queryname]" end set adors = adocomm.execute sheet2.range("a1").copyfromrecordset adors adoconn.close end sub

sql excel vba excel-vba ado

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -