Macro Filtering Help

S

Stacey Crowhurst

Hi. I'm not new to acces, but maros are foreign to me. I have a report that
shows transaction detail by vendor, sorted by vendor ID. I have a form that
lists all of my vendors in a list box (two columns: vendor ID, vendor name).
How do I create a command button that when clicked will open the transaction
report only for the vendor that was selected from the list box?

Let me know if you need more infomation. Thanks.
 
K

Kevbro7189

Make the NEW form, but ensure the ID that is in the OLD form is in the NEW
form. The next step, open the OLD form in Design View, under the Design tab
click on the Button and place one in your form.
Select:
Form Operations - Open Form - Next
Select:
NEW form - Next
NOW SELECT:
OPEN THE FORM AND FIND SPECIFIC DATA TO DISPLAY - Next
Select:
ID in the OLD form - ID in the NEW form - then you must click on the <->
Button – Next
 
S

Stacey Crowhurst

I'm not sure I understand. The item that I need to be filtered by vendor ID
is a report not a form. So I don't think that will work.
 
K

Kevbro7189

The ID is not a form or a report. It's in a table. The report is just how
the information is displayed. In order to manipulate the data it has to be
done from a form. A report is just a product.
 
S

Steve Schapel

Stacey,

I assume the commad button will be on the same form as the listbox.
Use a macro with an OpenReport action, and nominate the name of your report.

Then in the Where Condition argument of the macro, put the equivalent of
this...
[Vendor ID]=[Forms]![NameOfYourForm]![NameOfYourListbox]
 
S

Stacey Crowhurst

Thank you Steve. That is just what I needed!

Steve Schapel said:
Stacey,

I assume the commad button will be on the same form as the listbox.
Use a macro with an OpenReport action, and nominate the name of your report.

Then in the Where Condition argument of the macro, put the equivalent of
this...
[Vendor ID]=[Forms]![NameOfYourForm]![NameOfYourListbox]

--

Steve Schapel, Microsoft Access MVP


Stacey Crowhurst said:
Hi. I'm not new to acces, but maros are foreign to me. I have a report
that
shows transaction detail by vendor, sorted by vendor ID. I have a form
that
lists all of my vendors in a list box (two columns: vendor ID, vendor
name).
How do I create a command button that when clicked will open the
transaction
report only for the vendor that was selected from the list box?

Let me know if you need more infomation. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top