Opening a filtered form by double-clicking another form (1 Viewer)

N

nivek83

Guest
What I'm trying to do is pretty much a combination of both queries and macros, but I'm pretty sure I have the macro part figured out, so that's why I'm posting here. Here's my problem:

I work for a school district and I am setting up a database of all computer equipment in the district. One of the forms is a "Labs" form, which concisely conveys all the information about a particular computer lab. On this form are several sub-forms, including the printers, networking, and other equipment that are in the lab. On the "Labs" form, only the model of the piece of equipment is shown in the subform, but I am trying to make it so that you can double-click on the subform, and another form with all the information for that piece of equipment will open up, with only the equipment from that particular lab displaying in the form.

The labs and the other equipment are linked via a "location code", such that any equipment with the same location code as the lab shows up on the subforms. And so my question is, is there a way to display only the equipment in the new window with the same location code as the lab being displayed in the current window?

I have tried creating a query with the following criteria:
[Printers]![Location Code] = [Labs]![Location Code]

When I double click the box, I have a macro set to run to open up the form I want and use the previously described filter, but it asks me to enter the Parameter Value for Labs!Location Code. Does anybody know what I'm doing wrong and how I can get that to automatically be entered?

I have tried to be as clear as possible, but if anything is unclear, please let me know and I will try to rephrase it.

Thank you,
Kevin
 

Users who are viewing this thread

Top Bottom