[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Show/Hide Specific Tabs on Record Change

Posted on 2007-04-09
3
Medium Priority
?
242 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 1000 total points
ID: 18879059
Ah Access. Try using the form's OnCurrent event.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

873 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