Macro to Open different forms from a COMBO list

jh2593

Registered User.
Local time
Today, 03:38
Joined
Feb 23, 2011
Messages
11
I am trying to create a combo list in a form. The list will contain names of forms I can choose from to open. Once I select the form I want it to either automatically open that form I selected or I select a button that says open form. Either way I don't know how to do either of the two. I am running on Office 2010 at work and 2007 at home. :):)

I attached a example database
The form labeled Main Form is the form I have the combo list. Please help!!! Thank you! I don't know to much about macro rules so please explain in a easy way!
 

Attachments

I strongly suspect your table layout is not normalized, but:

DoCmd.OpenForm Me.ComboName

Why different tables with the same fields?
 
What do you mean "your table layout is not normalized"
I chose different forms because the person I am doing this for wanted the different forms. Would it be easier another way? I will try the code you suggest right now. Thanks!
 
Ok, I am playing with using only 1 form. I am able to open the form using on click macro settings, but how do I filter it? I am using office 2010
 
I appreciate your response, but that wasn't working because I am using a combo box. How do I use a filter from a combo box using office 2010. Or again I am willing to do a query filter and use one form if you can elaborate how to make that work.
 
Well, I just took a look at your database and I have to ask -

Why do you have tables of

Entercom 1
Entercom 2
Entercom 3
Entercom 4
Entercom 5
Entercom 6
Entercom 7
Entercom 8
Entercom 9
Entercom 10

which are the same exact fields?

And then you have the same with your forms - a form for each of those tables. It makes no sense to me whatsoever.
 
The person who I am creating the database for wanted them all to be separate. I just recently made it into one table and created different filter query's for each. Now I need help using a drop down menu form to select the different companies and have it open that one form with the filtered query. Does that makes sense? I appreciate your timely response. I will add an updated database.
 
Here is the most updated version of what I am working with. If someone can please review it and help that would be great!
 

Attachments

Here's your database back. I have set it so that the combo is based on a query of the system table for the forms. What you do in order to get the form to show up in that list is to name any form with the

frm_

prefix. So, if you name your form

frm_Entercom1

it would show up in the combo automatically and then when selected it opens the form.

If you add any additional forms, those won't show up in the list UNTIL you add the

frm_

part in front of the name, at which time it would then show up in the combo to be able to be selected.
 

Attachments

PERFECT! Thank you so much Boblarson! you just made my day! :):):):):):):):):):)
 

Users who are viewing this thread

Back
Top Bottom