var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Setting an MS Query as an ADO SQL source
Is this possible? Take this example:
Is it somehow possible to set sQRY to an existing Access Query rather than having to use SQL code?
Set cnn = CurrentProject.Connection
Set rs = New ADODB.Recordset
sQRY = "SELECT ID " & _
rs.Open sQRY, cnn, adOpenStatic, adLockReadOnly
Have you tried? It would normally work flawlessly, unless the query is complex (some of the issues might be stored subqueries) or contains parameters (from the top of my head)
rs.Open "qryMyQuery", cnn, adOpenStatic, adLockReadOnly, adcmdstoredproc
Cheers, that worked perfectly.
Out of interest, how would I specify a table instead of a query?
rs.Open "tblMyTable", cnn, adOpenStatic, adLockReadOnly, adcmdtable
(or adcmdtabledirect if needed, not available for all providers, but necessary if you're going to do .seek on native Access tables)