Solved

Show/Hide Specific Tabs on Record Change

Posted on 2007-04-09
3
233 Views
Last Modified: 2012-08-13
I have a form using Tabs.  I know how to allow a specific tab to only show when the value of a combo is correct, but I can't get it to auto-update when moving through current records.  Everytime a already-entered record is on the screen I need it to check pmStyle.  
If it's "A" then
Me.TabA.Visible = True
Me.TabB.Visible = False
If it's "B" then
Me.TabA.Visible = False
Me.TabB.Visible = True

Like I said, I can do this with a combo and I can do it onFormLoad but only for the first record that shows then it stays the same.  How I can take that same code and run it every time you flips to a different record?
0
Comment
Question by:zero118
  • 2
3 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 18878876
Your question has appeared in the Microsoft Word area, but tabs and the onFormLoad event are unfamiliar in Word VBA forms. Is it in some other environment?

That being said, it sounds as if you should call your code from the Click or Change event of the combo.

Sub Combo1_Change()
if Combo1.text = "A" then
'...
0
 
LVL 1

Author Comment

by:zero118
ID: 18878906
***Can a Mod move this to Access Please?***
That's what I'm doing right now but it doesn't help because I need it to check this condition as soon as each new record loads into the form when moving through them.
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 250 total points
ID: 18879059
Ah Access. Try using the form's OnCurrent event.
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question