Tay
likes garlic
- Local time
- Today, 13:12
- Joined
- May 24, 2002
- Messages
- 269
Dear all
I have a main form 'frmSchemeDetails'. Within this, I have a subform 'sfrmDetailsa'. The subform consists of a tab control, and on each of the six pages of this tab control, I have individual forms as subforms. Each tab page name is the same as the subform that that page contains. These are linked by 'txtSchemeID'.
My main form is based on scheme type, and so I need to bring up the correct subform. So, record No 1 is of Type A, the relevant subform should appear, etc. However, if record No 2 is of Type B, the Type A subform still shows, unless you click on the Type B tab page - then you will see the correct details, rather than a blank page.
I do not know what code I need to write (or how to reference the tab pages), so that if my textbox on the main form = Type A, then my subform should display the correct tab page (the one with the correct subform on it.
I had everything working fine before I changed my main form (the set up wouldn't allow me to use some screen resolution resizing code). It's just typical. You sort out one problem, then get another one in its place.
I would be most grateful if someone can point me in the right direction. Please?

I have a main form 'frmSchemeDetails'. Within this, I have a subform 'sfrmDetailsa'. The subform consists of a tab control, and on each of the six pages of this tab control, I have individual forms as subforms. Each tab page name is the same as the subform that that page contains. These are linked by 'txtSchemeID'.
My main form is based on scheme type, and so I need to bring up the correct subform. So, record No 1 is of Type A, the relevant subform should appear, etc. However, if record No 2 is of Type B, the Type A subform still shows, unless you click on the Type B tab page - then you will see the correct details, rather than a blank page.
I do not know what code I need to write (or how to reference the tab pages), so that if my textbox on the main form = Type A, then my subform should display the correct tab page (the one with the correct subform on it.
I had everything working fine before I changed my main form (the set up wouldn't allow me to use some screen resolution resizing code). It's just typical. You sort out one problem, then get another one in its place.
I would be most grateful if someone can point me in the right direction. Please?