Pages

Saturday, 26 November 2016

Generate Multiple PDF Report with different Criteria 3

Demonstration of how to.............. https://www.youtube.com/watch?v=IorNg7ROemE

Generate Multiple Copies of a Report (PDF Invoices) with different Criteria 2

Generate multiple copies of a Report with individual Criteria for each Report. Demonstrates how to change the Record Source of each Report, on each iteration of the Recordset Loop. Show how to use a Combo Box in the Report to display text from a related lookup table. Show that the record source SQL statement has a different value. Add a custom property to the form to hold the SQL Statement, the SQL Statement will be generated by a function in the Form. The Report will then interrogate the form, grabbing the SQL Statement from the custom property. Demonstrate how to insert Text straight into the Form Module. A Public Custom Property for holding the SQL Statement. See how to insert text straight into the Report module, a Public Custom Property for holding the name of the Form that Opened the Report. Shows how the Report On Open event extracts the Form name from OpenArgs. Demonstrate how you can use the Reports Open Event to use the DoCmd.Close command to close the Form that Opened the Report. https://www.youtube.com/watch?v=cJZzfjHCYcE

Generate Multiple Copies of a Report (PDF Invoices) with different Criteria 1

Generate multiple copies of the same report but with individual criteria for each report provided by an SQL statement. The requirement is for Reports with Ascending numbers in the Report Name. https://www.youtube.com/watch?v=4OH1owAcluw

MS Access - Generating Multiple Reports (PDF Invoices)

Generating multiple reports. Generating an invoice for each customer. Uses a Main Form to run a Record Set Loop (RSL) the record set loop loops through the SQL statement. The SQL statement is rendered unique by a value collected from the field. The SQL statement gets passed into the forms Public Custom Property. The code opens the Report. The reports Open Event extracts the SQL Statement from the Forms Public Custom Property. The SQL Statement is then passed into the Reports Record Source. https://www.youtube.com/watch?v=Tl-O3DabPz8

Thursday, 9 October 2014

Automatically add a Checklist to MS Access

This YouTube playlist shows how to add a single checklist to your MS Access DB. There is a good description how the code works.

YouTube video here:-
Automatically add a Checklist to MS Access: http://www.youtube.com/playlist?list=PLhf4YcS5AjdqzkQ5egOuO1myweo6hNgG2

Leszynski's on line book shows how to add User Level Security

Years ago I was fortunate to stumble across this online book "Access 97 Expert Solutions" by Stan Leszynski, famous for the "Leszynski naming Convention" used by many MS Access Developers.

On this Page about halfway down you will find a section titled:- Setting Custom Properties Using Property Let and the code (A custom property) :-

Public Property Let prpFormMode(rstrMode As String) ' Purpose: Set the form mode when the form opens ' Arguments: rstrMode:=Form mode: Add/AddEdit/Browse/Edit ' Pseudocode: ' 1. Check the form mode argument for validity ' 2. Enable/disable buttons and features depending on argument ' 3. Set the custom property equal to the argument Code is HERE:- Listing 12.6 shows the Property Let function for the prpFormMode property. If you note the interesting line - under pseudocode (line 2) ' 2. Enable/disable buttons and features depending on argument This is exactly what you want if you need to provide user level security in your forms. You place the custom property in the top of your form and you use it in a similar way to a function, by calling it and passing in as a parameter a text string which describes the layout and use that you want the form to offer the user. Let's say your options were "Admin" or "Data Entry". The parameter is fed into a case statement, in the case statement you can hide, disable, enable, change combobox rowsources, run functions, set the controls default value, anything basically you want to do to make the form "appear as" and do whatever you wish.

Excel to Access (A)

In Microsoft Access you don't think about your data as being pages, you think about it as being a continuous list. The general way to extract data is to ask a question like "which part of this list do I want?" In your case you would say I want this "customer" where this date = X. You would ask this question with an SQL statement something like:- Select fld1, fld2 From tblMyTable Where Customer = "Fred" and myDate <> date A further requirement "If there are no results then I do not want to print the report." You would count the results returned by the above query and if the count was 0 then you would not create the report. You also want to ask the question, not for just one customer but for each customer. To achieve this you would use an SQL statement which gathers the customer names then you would put this record set into a record set loop and interrogate each record in turn. So your original question is now broken down into several elements the first element being:- "In your case you would say I want this "customer" where this date = X." Once you have achieved this you can then concentrate on solving the next element and once you have an understanding of all the elements you can draw it together to produce the result you want. Shared from Google Keep