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.

 All Forums
 Other Forums
 MS Access
 write a variable into report property field.

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 box

I 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 code
Me.RecordSource = "SELECT * FROM BLA BLA" or from variable.
Go to Top of Page

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.
Go to Top of Page

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
Go to Top of Page

pyrrhus_finch
Yak Posting Veteran

51 Posts

Posted - 2005-07-06 : 14:25:07
Ahh. that's good to know. Thanks!

= )
Go to Top of Page
   

- Advertisement -