var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: VBA code for running an updateable select query.
I have the following code:
'Prepare the query
Lookupstr = "SELECT TblExchRateMaster.YearsID, blah blah"
Lookupstr = Lookupstr & "FROM TblPeriod INNER JOIN blah blah "
Lookupstr = Lookupstr & "Where (((TblYears. blah blah"
Lookupstr = Lookupstr & "ORDER BY TblExchRateMaster. blah blah;"
'Execute the query
The error I get is "Cannot execute Select query".
I am able to make this work as a saved query and call it in a form by:
DoCmd.OpenQuery stDocName, acNormal, acEdit
...but am not able to run it from code...
Also tried the DoCmd with Lookupstr. It doesnt work.
Thanks & Rgds,
Re: VBA code for running an updateable select query.
Depends on what you want to accomplish.
to return a recordset:
Make everything as simple as possible, but not simpler! - A. Einstein
DB Problems? DB Explorer
, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool
Maybe check your spacing (spaces) in Lookupstr. (??)