Variables in select statement

  • Thread starter Thread starter Jarryd
  • Start date Start date
J

Jarryd

Hi,

How do you declare variables in an Access 2007 SELECT statement?

I want to do something like:
Dim PCLine as Integer
SET PCLine = 0
SELECT IIf(Col1 = 1, "Cool", PCLine = Col1) AS Example;

TIA,

Jarryd
 
On Tue, 26 Jan 2010 13:11:43 -0000, "Jarryd" <[email protected]>
wrote:

SQL Is not appropriate for that; it is to operate on data in your
tables. For data and variables in code, use VBA.

-Tom.
Microsoft Access MVP
 
Back
Top