Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
pyrrhus_finch
Yak Posting Veteran
51 Posts |
Posted - 2005-07-05 : 23:20:14
|
What is the sytax if in the Properties> DATA> Recordsource boxI wanted to call a variable or a global variable? instead of writing in a sql statement?I have a global variable that contains the statement so - - I want'ed to try calling it there. Thanks |
|
Hyukevain
Yak Posting Veteran
66 Posts |
Posted - 2005-07-06 : 01:49:30
|
On Form_Load Event, just write this codeMe.RecordSource = "SELECT * FROM BLA BLA" or from variable. |
 |
|
pyrrhus_finch
Yak Posting Veteran
51 Posts |
Posted - 2005-07-06 : 12:58:35
|
hmmm...but is three a way to write a variable into the properties textbox.. like[gRptSQL]except that doesn't work. |
 |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2005-07-06 : 13:42:57
|
No. The property sheet accepts a string literal, not an expression. You must use VBA, as shown. Just set the property equal to whatever expression you need on the Load() event of the report.- Jeff |
 |
|
pyrrhus_finch
Yak Posting Veteran
51 Posts |
Posted - 2005-07-06 : 14:25:07
|
Ahh. that's good to know. Thanks!= ) |
 |
|
|
|
|