View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ward376 ward376 is offline
external usenet poster
 
Posts: 360
Default Excel, reference a cell for parameter in SQL to import data

Use square brackets in thew statement. When you refresh the table, it
will prompt you for a value and give you the option to select a range
and save it (or a value) in the query.

WHERE GlTrans.Period_Date < [ ]

You can also edit parameters from the data menu - Dat,Import External
Data, Paramaters.

If you are using the visual interface to create queries you can enter
the square brackets in the dialog box as the value when you're choosing
criteria.