The attached zip file contains a word document with instructions on how to use the GetField function in your system. Also included is a demo database which is referred to in the instructions.
The report in the demo database cannot be run directly and must be run from the form. The form demonstrate the use of parameters. It allows the selection of Male, Females or All and the selection of only tenants on the mailing list.
I created a larger table of tenants (tblTenantsBig) for testing which have left behind in case you want to test it. This table has 928 records in it. On my system it took about 30 seconds to produce the report with this table. This isn't too bad considering the GetField function is called about 2560 times. Anyway I suggest enclosing the report open with the hourglass as I have in the demo database like this:
If you have any problems using any of this please let me know.
One more thing. The order of the names on the labels is controlled by the TenantID which is an Autonumber. It's probably a good idea for it to be an autonumber, but you can't modify an autonumber value. So if you want to change the order of the tenants on the list you will have to delete them and readd them in the order you want. If you want some code to help you do this let me know.
The order of on the label could be determine by something else, e.g., sorted by last name. If you want to do something like that let me know.
The report in the demo database cannot be run directly and must be run from the form. The form demonstrate the use of parameters. It allows the selection of Male, Females or All and the selection of only tenants on the mailing list.
I created a larger table of tenants (tblTenantsBig) for testing which have left behind in case you want to test it. This table has 928 records in it. On my system it took about 30 seconds to produce the report with this table. This isn't too bad considering the GetField function is called about 2560 times. Anyway I suggest enclosing the report open with the hourglass as I have in the demo database like this:
Code:
DoCmd.Hourglass True
DoCmd.OpenReport "rptLabels", acViewReport, "", "", acNormal
DoCmd.Hourglass False
If you have any problems using any of this please let me know.
One more thing. The order of the names on the labels is controlled by the TenantID which is an Autonumber. It's probably a good idea for it to be an autonumber, but you can't modify an autonumber value. So if you want to change the order of the tenants on the list you will have to delete them and readd them in the order you want. If you want some code to help you do this let me know.
The order of on the label could be determine by something else, e.g., sorted by last name. If you want to do something like that let me know.