Display and Empower multiple subforms

  • Thread starter prosfora via AccessMonster.com
  • Start date
P

prosfora via AccessMonster.com

Combo boxes cboTN and cboSB are on my main form. cboTN is a search combo box
that updates combo box cboSB with one of 3 values (ID, IDC, or MC).

I would like to do the following:

1:
If the after-update value of cboSB is ID, subform sf1 will be visible.
If the after-update value of cboSB is IDC, subform sf2 will be visible.
If the after-update value of cboSB is MC, subform sf3 will be visible.
(only one subform visible at a time since they are stacked in one place on my
main form)

2:
Once the appropriate subform is displayed, is it possible to use option
buttons to set the property of the subform to either Add-only mode or Edit-
only mode? If so, how? (perhaps some sort of Case A, Case B scenario with
the option buttons?)

If you can help with either of the above; example codes would help my novice
skills greatly!
 
T

Tom Ellison

Dear pro:

The event to do this is probably the Click event of the cboTN control.

In the code for this, set all 3 subforms to be Visible = False. Then set
the desired subform to be Visible = True.

Option buttons are numeric, so the switch statement for the subform's mode
would be Case 1, Case 2, etc.

In coding, remember that there is a subform control on the main form, then a
subform within that. This is probably the biggest common error with what
you'll be doing.

Tom Ellison
 

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