I posted last week (07/04/03)regarding setting the monthly date criteria in a query to apply to different tables and monthly reports.Thanks to both Rick Spr and scriverb for your help and support.
As RickSpr kindly outlined, I can use VBA to build a SQL query string to plug in a choice of table and a columns' value (chosen from a form)to a Public Variable As String (after clicking ok).In a report module, I could then set the Open Event procedure to set the RecordSource property to the value of the initials form's Public Variable.
My problem is I have no experience with SQL query strings or creating Public Variables As Strings.
Could anyone provide an example of how this SQL query string would be coded and how to address the Public Variable.
Unfortunately, I'm fairly novice and I'm currently in a part of the world without much local resources/support available.
Thanks in advance.
As RickSpr kindly outlined, I can use VBA to build a SQL query string to plug in a choice of table and a columns' value (chosen from a form)to a Public Variable As String (after clicking ok).In a report module, I could then set the Open Event procedure to set the RecordSource property to the value of the initials form's Public Variable.
My problem is I have no experience with SQL query strings or creating Public Variables As Strings.
Could anyone provide an example of how this SQL query string would be coded and how to address the Public Variable.
Unfortunately, I'm fairly novice and I'm currently in a part of the world without much local resources/support available.
Thanks in advance.