0
votes

I am building a database on MS 2003. I have one form which calls for a series of options. This form is based on the table "Categories" which is linked to the main table by Customer ID.

Now, both forms appear together on the same screen, what I am trying to do is have the person select one or more of the categories and in pressing a command button then those categories which were selected will show its respective forms. The forms are invisible until selected and until the command button is pressed.

Since they are two different forms (categories in one) and the entry form on another, How do I program the command button to make the entry form visible FROM the other form?

The sub-form is located in a tab. I dont want to show it as a pop-up but to become visible within the tab where it's located

2
Alex, I recommend you change the title on this post. You can't expect to get much help with a title like that. Also, if one of the answers below helped you find a solution then you should accept than answer.HK1

2 Answers

1
votes

If the form is open but invisible then you can refer to it as a member of the forms collection and make it visible:

forms("myForm").Visible = true

If the form isn't open then get its name from the AllForms collection of the project and then use the OpenForm method:

docmd.OpenForm currentproject.AllForms("myForm").Name, acNormal
0
votes

Pseudologic: you are basically going to want to set the Visible property with all of your forms to False during the form's Open event. You should place this Visible = False code in a separate subroutine so that the code structure can be called during other events too. (For example you may want to provide a Reset button so that the user can reset the form, or trigger the "set false" code when a new customer id is selected.) Then with every selected category you would set its associated form property visible by setting Visible = True.