Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make form footer invisible 1

Status
Not open for further replies.

nim180

IS-IT--Management
Aug 11, 2005
161
AU
Hi everyone, i have a form with a tab control which contains 3 pages. I also have a sub-form on the footer of the main form, now when i click on page 2 of the tab control i want the formfooter to disappear. Ive used the following on the onclick event of page 2 of the tab control but it doesnt seem to work.

Private Sub Issue_New_Key_Click()
If Me.FormFooter.Visible = True Then
Me.FormFooter.Visible = False
End If
End Sub


Can someone steer me in the right direction

thanks,
nim
 
You could try this...
Code:
Private Sub TabCtl0_Change()

Select Case Me.TabCtl0.Value
Case 0
'Nothing
Case 1

Me.FormFooter.Visible = False

End Select

End Sub

Pampers [afro]
Keeping it simple can be complicated
 
How are ya nim180 . . .

You should be using the [blue]On Change[/blue], event so remove the [blue]On Click[/blue] event entirely.

In the [blue]On Change[/blue] event of the TabControl, copy/paste the following . . . realizing that [blue]Page index[/blue] starts at zero:
Code:
[blue]   Dim Flg As Boolean
   
   If Me![purple][b][i]TabCtlName[/i][/b][/purple] = 1 Then Flg = True
   Me.FormFooter.Visible = Flg[/blue]
[blue]Your Thoughts? . . .[/blue]


Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Hey Aceman,

That worked well but now when i hit tab1 the form footer appears with the subform which is perfect but when i hit tab2 the form footer disappears but leaves a "Blank space" where the formfooter should be, anyway of making this dissappear?

nim
 
hey pampers,

i took alook at your way but it didnt work, aceman's method worked but created a 2nd problem

nim
 
Maybe you could hide the subform instead of the formfooter?

Me.frmSubform.visible = false


Pampers [afro]
Keeping it simple can be complicated
 
that would still leave the blank space of the form footer in the background which i would need to get rid off!

Nim
 
By the way,

If Me!TabCtlName = 1 then
'Do stuff

is the same as

Select case Me.TabCtlName.value
Case 1
'do stuff




Pampers [afro]
Keeping it simple can be complicated
 
let me fiddle around with the code and see if your way works, i may have inputted something wrong.

nim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top