I need some help with my macro. I currently have 80 seperate jobs which will grow to 450 by the end of May. I have created a macro to select print or print preview of these jobs, but I'm having trouble bringing up only the job selected from a lookup table. It always brings up the first job in the report, (not the job selected), plus all 79 other jobs which makes it harder to find the correct job and print it.
My macro has the code to open the report, the correct views (both print and print preview) and in the Where Condition:
IIf([Forms]![Print Reports Dialogue]![Select Job] Is Null," ","[Job No] = Forms![Print Reports Dialogue!]![Select Job]")
[Select Job] is the lookup table
[Job No] is the key for the lookup table
This code was to make all pages show if none are selected which it does anyway!?!?
I got this code from a book and modified it to suit my forms etc. Do I need to make a specific report (change the query) that can only bring up one page (?) or change the coding above to a working code.
It all worked in the book (apparently) but I can't find a specific reference to their query to check that.
Thanks.
My macro has the code to open the report, the correct views (both print and print preview) and in the Where Condition:
IIf([Forms]![Print Reports Dialogue]![Select Job] Is Null," ","[Job No] = Forms![Print Reports Dialogue!]![Select Job]")
[Select Job] is the lookup table
[Job No] is the key for the lookup table
This code was to make all pages show if none are selected which it does anyway!?!?
I got this code from a book and modified it to suit my forms etc. Do I need to make a specific report (change the query) that can only bring up one page (?) or change the coding above to a working code.
It all worked in the book (apparently) but I can't find a specific reference to their query to check that.
Thanks.