1.

Solve : Opening a form in an Access Database?

Answer»

I'm trying to have a different form open up BASED on a selection made in a field in a currently open form.
Example: The user has frmOrders open. There is COMBO box on the form where the user can select, for example, Toys, Baseballs, Clothes, CARS or Shoes. If the user selects Clothes, then frmTextiles should automatically open up.

What's the easiest way to make the above happen? THANKS in ADVANCE for any help offered.
You could test if one of items has been selected:

if Combobox.Selected(0) = "Clothes" Then frmTextiles.Show
if Combobox.Selected(1) = "Toys" Then frmToys.Show
.
.
.

There are other ways, some very imaginative. One would be to hide the form name in the combobox, then using a for/next loop, find the item selected and show the proper form..

The if statements offer a brute force method, but many times simple is better.



Discussion

No Comment Found