PDA

View Full Version : Help with query



mferrisi
04-11-2007, 07:53 AM
Sub No_More_Pages()
Dim TempM()
ReDim TempM(1 To 1895, 1 To 5)
databasename = DbConnectionHF 'the database connection

querystring = "SELECT the_name, the_id, the_period, the_date, the_actv_mny FROM THEDATABASE.THETABLENAME"

TempM = sqlrequest(databasename, querystring, , 4, False)
ub = UBound(TempM, 1)


After I run the query, ub is 817-- even though there is sufficient data (and all is brought in) when I run the query through 'import external data'. Am I missing something obvious?

Thank you

Oorang
05-10-2007, 03:49 AM
MS reccomends that you use the ADO approach. See http://vbaexpress.com/kb/getarticle.php?kb_id=889 for more information on how.