Choose from Multiple Forms to Open 1

  • Thread starter Thread starter jenni
  • Start date Start date
J

jenni

Hi -
I have a 25 versions of one form that is based on the
same query. The query contains 48 different fields.
Each one of these 25 form versions represents a different
product. I set up a different form for each product
because each of the products needs to show a different
combination of the 48 fields from the query. (anywhere
from 4 to 10 of the fields)

So for example, 3 of my forms are:
frm_AA
frm_AN
frm_AW

What I would like to do is have a combo box select that
would dictate which of the 25 forms to open. I have a
switchboard form right now that contains combo boxes to
filter the query records that will display in the form.
One of these combo boxes is the list of products, (AA,
AN, AW). Is there a way to use this combo box to dictate
which of the 25 forms to open?

Please help, I have been stumbling over this for a while
now.
Thank you! :)
 
In the AfterUpdate event of your combo box,

Dim strfrmname as String
If Not IsNull(Me!<yourcomboboxname>)
strfrmname = "frm_" & Me!<yourcomboboxname>
DoCmd.OpenForm strfrmname
End If

HTH
Kevin Sprinkel
 
Jenni,

My earlier post would open the form immediately after
changing the combo box. On further thought, it makes more
sense attached to a command button.

Good luck!

Kevin Sprinkel
 
Back
Top