Open a set or single form from a value based in a combo box

G

Guest

I've created a "Project Search" Form where a user can select a value (like a
Project Manager's name, or the Name or Number of a project). The ides is
that after they make that selection the correct Form or filtered forms are
displayed to the user and the Project Search Form is closed. I wish I could
just write something like:
OPEN(Form name is:) "Project Main Level Info View" WHERE (name of project
manger) "ResourceMPM" = the displayed or selected name AND "ActualEndDate"
IsBlank.
The desired result of this is that I would see all projects for that project
manager that have no actual end date value presented in the Filtered result
of the Project Main Level Info View form(s)

As you can tell - that is an example of the extent of my coding knowledge -
so be gentle ;-)

Do I create some macro that I call on some Event or do I hvae to create a
command button that calls the contents of the unbound selection?
 
P

Pictou

If you are using a combo box to select a project then If your form is bound
to a query or a table, you can use the before_update event for a combo box.
If the form is not bound to the database then then use the click event. In
the event use docmd.openform to open the next form and follow that with
docmd.close. You can include the selected project as a parameter that is
passed to the form being opened. In the new form's load event, check for
the existence of a string in openarg and parse that for parameter(s). You
can use the parameter value in a filter or as a parameter to a query and set
the form recordset to the query.
 

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