Switchboard Problem

G

Guest

I want to have one form that I can call from a switchboard and filter for
several people using a macro. I’m using Access 2007 and my setup is as
follows:

SWITCHBOARD:
This is a manually designed switchboard where I’ve put a tab control with 2
tabs titled “Input Forms†and “Reportsâ€. On the “Input Forms†tab I have
placed a combo box named “cboExpItemsâ€. This is a drop-down box which
displays employee names from a table. I want to select a name and using an
“AfterUpdate†event I want to run the following macro which will refer back
to “cboExpItems†for the name of the employee to filter the form.

MACRO:
Name: ExpItemsSpPerson
Action: OpenForm
FormName: Expense Items
View: Form
Where Condition: [RequestedBy]=[Forms]![Main
Switchboard]![cboExpItems]
Window Mode: Normal

This is not working.

When I select the employee name in the “cboExpItems†drop-down box I get
“Enter Parameter Value†with the above “[RequestedBy]=[Forms]![Main
Switchboard]![cboExpItems]“ shown.

Is my “Where Condition†statement not correct since I’m using a tab? I’ve
used this setup before and it has worked fine. I’m new to Access 2007 so
maybe something has changed. Thanks for your help.
 
G

Guest

Hi Don,

Just taking a wild guess here..

Try:
Where Condition: "[RequestedBy]= " & [Forms]![MainSwitchboard]![cboExpItems]
 
G

Guest

I failed to explain that [Requestedby] is a field on the form the macro is
opening. It should get it's value from the "cboExpItems" on the switchboard.

Maurice said:
Hi Don,

Just taking a wild guess here..

Try:
Where Condition: "[RequestedBy]= " & [Forms]![MainSwitchboard]![cboExpItems]

--
Maurice Ausum


Don S. said:
I want to have one form that I can call from a switchboard and filter for
several people using a macro. I’m using Access 2007 and my setup is as
follows:

SWITCHBOARD:
This is a manually designed switchboard where I’ve put a tab control with 2
tabs titled “Input Forms†and “Reportsâ€. On the “Input Forms†tab I have
placed a combo box named “cboExpItemsâ€. This is a drop-down box which
displays employee names from a table. I want to select a name and using an
“AfterUpdate†event I want to run the following macro which will refer back
to “cboExpItems†for the name of the employee to filter the form.

MACRO:
Name: ExpItemsSpPerson
Action: OpenForm
FormName: Expense Items
View: Form
Where Condition: [RequestedBy]=[Forms]![Main
Switchboard]![cboExpItems]
Window Mode: Normal

This is not working.

When I select the employee name in the “cboExpItems†drop-down box I get
“Enter Parameter Value†with the above “[RequestedBy]=[Forms]![Main
Switchboard]![cboExpItems]“ shown.

Is my “Where Condition†statement not correct since I’m using a tab? I’ve
used this setup before and it has worked fine. I’m new to Access 2007 so
maybe something has changed. Thanks for your help.
 

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