Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 18th, 2004, 12:28 PM
Authorized User
 
Join Date: Jun 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hide Tabs in a Form Based on a field.

I would like to hide a tab based on a combo box.

my filter is based on a field, fruit.

if i filter my records on apples , I want the tabs apple1 and apple2 to be visible (and orange inivisible).
if i filter based on oranges, I want the tabs orange to be visible and (apple1 and apple2 invisible).


Does this make sense?

Thanks!

Angel

 
Old November 18th, 2004, 02:33 PM
Registered User
 
Join Date: Nov 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

On combo box AfterUpdate event
cboSearch_AfterUpdate()
use code like this.
If combo box has value as number
If Me.cbo.column(0) = 2 Then Me.pgapple1.Visible = False
If combo box has value as string
If Me.cbo.value = "Orange" Then
Me.pgapple1.Visible = False
me.pgOrange.visible = True
END if








Similar Threads
Thread Thread Starter Forum Replies Last Post
Tab item display prob / hide TABS query socoolbrewster CSS Cascading Style Sheets 4 June 13th, 2006 12:59 PM
A form field list populating based on another fiel ebburks Access 2 June 3rd, 2006 09:37 AM
Select a field on a form, based on variable JAnthony Access VBA 2 April 17th, 2006 11:16 AM
Update city field based on zip field nganb SQL Server ASP 0 April 22nd, 2004 10:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.