Solved

Show/Hide Specific Tabs on Record Change

Posted on 2007-04-09
3
231 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

There is a feature provided by MS Word that lets you create an Table of Contents for your Word document automatically. To use this feature for other documents there are two steps involved,   1.  Prepare your document for a table of contents (he…
Introduction Authors who set out to write any sort of lengthy piece for online submission—be it a long question or comment on a technical form, an article, or a substantial blog entry—often find it useful to work up a draft in an editor other t…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now