Option Group Type Mismatch

S

Steve

I am using Access 2007 on a Windows 7 machine.
I have an unbound form named frmChoose_Reports to select reports to print.
This form has two option groups named ReportSelctor and ReportType.
ReportSelector contains 11 option buttons to select the desired report and
ReportType contains 3 option buttons to select whether the report is
displayed in a datasheet, pivot chart or pivot table view. A Print button
activates a macro.

The macro has conditional statements that check the values of the option
groups to print the desired report in the proper format. The conditional
statement format is:

[Forms]![frmChoose_Reports]![ReportSelector]=1 And
[Forms]![frmChoose_Reports]![ReportType]=1

If the condition is satisfied, a query is executed. I have a conditional
check for each possible combination of values in the two option groups.

When an option is selected the macro begins and I get a “Type Mismatch†error.

Any suggestions?
 
R

roger

in a VB If then statement with 2 conditions you have to put the conditions in
parentheses

([Forms]![frmChoose_Reports]![ReportSelector]=1) And
([Forms]![frmChoose_Reports]![ReportType]=1)

try that
hth
 

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