The switchboard command is set to "Run Macro"
The macro is:
Line 1 - Action: Echo - No
Line 2 - Action: Hourglass - Yes
Line 3 - Condition: IsNull([Forms]![frmLogin]![Region]) And
IsNull([Forms]![frmLogin]![Division])
Action: OpenForm
Form Name: frmP&AEntry2006, View: Form, Data Mode: Edit
Line 4 - Condition: ...
Action: Stop Macro
Line 5 - Action: OpenForm
Form Name: frmP&AEntry2006, View: Form, Filter Name: qry2006DataEntry,
Where: qry2006DataEntry]![Region]=[Forms]![frmLogin]![Region] Or
[qry2006DataEntry]![division]=[Forms]![frmLogin]![division], Data Mode:
Edit
Line 5 - Action: StopMacro
The frmLogin stays open at this point, just not visible. When the person
logs it, there are fields on the form that set values for what access they
have. When they open the form, if there are values filled in, the form
filters to those values. If they don't have any values, they have full
access and the entire form opens with all info.
As I mentioned, it works when I run the macro from the database window.
Steve Schapel said:
Karen,
In there any action in the macro apart from the OpenForm action? Are
you running it from the Click event of a command button?
--
Steve Schapel, Microsoft Access MVP
Karen wrote:
I have created a macro to open a form. When I run the macro, it opens
the
form correctly. When I call the macro from the switchboard, it locks
up the
database and I have to stop the database using the task manager.
Any help will be greatly appreciated