I currently have a 'main' form where I push a button and another form pops up with more details. These two forms are linked by the primary key so if the main form is displaying information about "A", the popup form will display detailed information about "A".
Now, I have a button on the popup form that brings up a report preview, however, the problem is it brings up 15 reports; one for each of the primary keys. I need a way so that only one report opens based on the primary key that is currently present on form "A" and the popup form.
I looked, but I do not believe I saw anything in the code that would let me limit what is coming up. Perhaps I need to run a query and then base the report of the query? Problem that I forsee with that is that the report will be outdated if I change any figures because I have noticed that anything based off of queries seems to have problems.
I get what you mean by fourth argument in the clause, but:
"[EType]='" & primaryKey & "' "
means nothing to me. What is the [EType] = ? Though I'm assuming the primarykey would be whatever the primary key is on the table that is being reference rather than some different meaning for primary key.
My example showed an equipment report that was restricting the report to only those where the equipment type was that of the primary key on the form. You will have to replace EType with whatever criterion you are looking for; furthermore, my example assumes that etype is a text field. Perhaps I should have used a more generic example: