Northwind sample of filtering by toggle button

F

Frank Situmorang

Hello,

I have checked the macro of the Customer phonelist in the Northwinds
database. Could anyone help me how can we see that this macro is attacnhed to
Form?, I do not see it attached to the form nor to the Company name field
either.

Thanks in advance,

Frank
 
A

Allen Browne

The buttons are part of an option group, and the macro is attached to the
AfterUpdate event of the group.

1.Open the form in design view.

2. Right-click the rectangle below the buttons in the Form Footer, and
choose Properties.

The Title of the Properties box should now read:
CompanyNameFilters

On the Event tab, the After Update property shows the macro.
So, the macro fires whenever the depressed button in the group changes.
 
F

Frank Situmorang

I have done like your instruction,but nothing I can see in the event
property, please help what goes wrong with my sample.

Frank
 
S

scubadiver

When you press on any of the letters does the form filter?

If not open the "Customer phone list" form in design view, right-click on
the light grey box surrounding the letters in the footer and go to
properties. In the after update event select the following

Customer Phone List.Alpha Buttons

In the "other" tabe the name should be "CompanyNameFilters".
 
F

Frank Situmorang

That is why I wondered Scubadiver, the light gray is the toggle button with A
in the Other tab, so it is not like what you said. And nothing at all in the
Afterupdate event, or any other events.

Please help, I do not understand how the macro can work, yes if I press the
botton the filter does work. I know there is a Macro that has condition. For
your information Option Value 1 thru 26 is the value given to each
alphabetical toggle button.

Thanks in advance,

Frank
 
S

scubadiver

Ah! Now I see.

If there is an "A" in the "other" event you have opened the properties for
the "A" toggle button NOT the option box.

You are looking in the wrong place.

Click on light grey square that surrounds ALL the buttons then you should
see lots of black squares. Then right click and choose properties
 
F

Frank Situmorang

Dear Scubadiver:

I will make the condition in macro for payment date is not null for " paid"
invoices and Payment date is null for the outstanding, but I do not know what
condition should I make for to show "all"

Could you please help me?

Frank
 
S

scubadiver

In the macro

the first line refers to paid invoices, the second line refers to
outstanding invoices, the third line is to show all records

Macro Name Condition Action Where Condition

Payment [Paydetail]=1 Apply filter [paydate] is not null
[Paydetail]=2 Appliy filter [paydate] is
null
[paydetail]=3 ShowAllrecords

In the "form design" toolbar there is a button with an "XYZ" on it. Go
through the wizard (but you need to highlight the wand at the far left of the
toolbar).
 
F

Frank Situmorang

Scubadiver:
I have done exaclty like you said but it does not work. Maybe I have not
told you my form sturcture. I have the main form which showing supplier no,
name and contact details, then I have subform containds invoices details.
This Form and sub form is working for filtering by form on the toolbar
swhoing the selected supplier with the inovice details. But I copied the form
for my future development coz I want it when I filter by supplier in the
mainform, then I filter again by subform just by pressing the buttons
"Outstanding Only"; "Paid Only"; "Show All.

So my overall problem now in this development is

1. Combox selection by supplier now is not working, how can we make it
selecting the supplier just by choosing from the combo box
2. After showing all invoices' detail for the selected supplier, how can we
make the option group working just by pressing the button "outstanding
only"," paid", and "show all". I finished creating the macro which I attached
to the subfrom option group and I put the option group in the subform header

I appreciate your help.

Frank
Greetings from Jakarta, Indonesia.

scubadiver said:
In the macro

the first line refers to paid invoices, the second line refers to
outstanding invoices, the third line is to show all records

Macro Name Condition Action Where Condition

Payment [Paydetail]=1 Apply filter [paydate] is not null
[Paydetail]=2 Appliy filter [paydate] is
null
[paydetail]=3 ShowAllrecords

In the "form design" toolbar there is a button with an "XYZ" on it. Go
through the wizard (but you need to highlight the wand at the far left of the
toolbar).



Frank Situmorang said:
Dear Scubadiver:

I will make the condition in macro for payment date is not null for " paid"
invoices and Payment date is null for the outstanding, but I do not know what
condition should I make for to show "all"

Could you please help me?

Frank
 

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