Dual conditions for Macro

kman

New Member
Joined
Dec 11, 2002
Messages
35
I have created a macro that successfull produced a report based on a macro that uses a form field for a where clause in a report.

Now I want to add another condition but it is giving an error. Can you pass two conditions in a single macro in a single where clause.

This where clause in my macro worked:
installation is the fields
form is customer labels dialog
and field name on form is select country
[Installation]=[Forms]![Customer Labels Dialog]![SelectCountry]

When adding another clause this does not
[Installation]=[Forms]![Customer Labels Dialog]![SelectCountry] and [Compo]=[Forms]![Customer Labels Dialog]![SelectCompo]
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,221,503
Messages
6,160,193
Members
451,630
Latest member
zxhathust

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top