Solved

Show/Hide Specific Tabs on Record Change

Posted on 2007-04-09
3
236 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

If you work with Word a lot, you probably use styles. If you use styles a lot, you've probably balled your fist more often than not when working with the ribbon. In Word 2007/2010, one of the things that I find missing when using styles is a quic…
The Selection object is designed for user interaction. It has a Range property, so it can be used in most places that a Range object can. Recorded macros must use the Selection because they are simply copying what the user is doing. A Range prope…
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.

719 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