I am a self-taught Access developer working in Access 2013, who has created a number of databases, some quite extensive, but I have never needed to use VBA code before.
I am developing a warehouse database to pick and despatch two types of products: packaged goods and perishables. Each type is stored and picked separately and amalgamated at dispatch.
For the picking lists I have created a report with a sub-report, in Design View and an underlying query for each. The report has the details of each customer’s order and the sub-report details the items. They are connected in a parent child relationship via Customer ID. It all works and filters on the queries all work, so now I want to automate this.
What I want to do is print a packaged goods picking list, and a perishable goods picking list, for each customer.
I entered the SQL code for the queries in VBA, which is contained in strings: strOrders and strLines and recordsets for each: rsOrders and rsLines. I have also created a Boolean variable to filter the sub-report for each type of product. Is this the right approach?
I have a loop working that loops through rsOrders and and another inside that switches the boolean variable, but what I can’t work out is how to get the records to filter and appear on the report.
I had expected to find a publication like “All About Reports in Access 2013 VBA” on the internet, but no luck. Can anyone please point me towards a: book, article, internet tutorial or any published material that deals with this subject. It seems to be the subform that complicates things.
Many thanks
I am developing a warehouse database to pick and despatch two types of products: packaged goods and perishables. Each type is stored and picked separately and amalgamated at dispatch.
For the picking lists I have created a report with a sub-report, in Design View and an underlying query for each. The report has the details of each customer’s order and the sub-report details the items. They are connected in a parent child relationship via Customer ID. It all works and filters on the queries all work, so now I want to automate this.
What I want to do is print a packaged goods picking list, and a perishable goods picking list, for each customer.
I entered the SQL code for the queries in VBA, which is contained in strings: strOrders and strLines and recordsets for each: rsOrders and rsLines. I have also created a Boolean variable to filter the sub-report for each type of product. Is this the right approach?
I have a loop working that loops through rsOrders and and another inside that switches the boolean variable, but what I can’t work out is how to get the records to filter and appear on the report.
I had expected to find a publication like “All About Reports in Access 2013 VBA” on the internet, but no luck. Can anyone please point me towards a: book, article, internet tutorial or any published material that deals with this subject. It seems to be the subform that complicates things.
Many thanks