Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get rid of extra lines on form when using tabs

Status
Not open for further replies.

HockeyFan

MIS
Jun 21, 2005
138
US
On my form, I created an object using the 'tab control' button. I have a number of fields on the 6 different tabs that I have created.
The problem is when I switch from tab to tab, I seem to get left over lines on the screen from the previous tab. If I click back and forth from the different tabs, it doesn't clear up all of the white space.

I tried putting a refresh on the properties of each tab itself, but that doesn't seem to help. I put it on the 'on click' event, however the way it is functioning, is you have to click the white area for the lines to go away.
I would like to find a way to have the lines clear out automatically when the user clicks from tab to tab.
 
They are just phantom extra marks on the screen. They appear to be the remains of some of the outlines from the input boxes on the previous tab. As mentioned, they go away with the on-click event that I put on each tab, but I would rather not have to have the user click the white space to do a refresh. It would be nice it I could get it to automatically do the refresh each time they click from one tab to another. I don't know why they're there in the first place.
 
It does it regardless of the pc that I run it on, so resolution and drivers can't be the issue.
I can try recreating the form and see what happens.
 
I think the form became corrupted somehow??? I recreated it and there are no lines. Thanks again Duane for your awesome assistance.
 
Well, I recreated the entire form with all of the tabs, and all the fields on it. I thought the problem was fixed because when you switch from tab to tab, i didn't see any of the graphics from the previous tab.
Well when I changed most of the fields to be not enabled, that's when the problem reoccurred. I have a lot of the fields on the tabs set to be not enabled because I only want the values to be visible, but not changeable.
There seems to be a problem with Access of when I set most of the field on the page to be disabled. When you switch from tab to tab, you will see parts of the text boxes remain on the screen from the previous tab.
Any ideas on how to solve this situation? A refresh does take them away, but I would want that to be automatic when the user clicks each tab.
 
I'm using 2003. I have a form with 6 tabs on it. When you have a bunch of fields on each form and you tab from one form to the next and back and forth, it works fine. But if you disable all of those boxes and tab back and forth a bunch, then you will see the phantom lines left on the screen.
If you're still feeling like it's corruption on my end then so be it. I did recreate the tabs completly, and all the forms, and it's still doing it.
How about this solution. I noticed if I do a refresh after I click on the tab, the lines disappear. Could you assist me in coming up with a method to automatically do a refresh when the user clicks each tab? When I put a refresh on the 'on click' command, that didn't work as expected. It was actually expecting the user to click into the white area on the tab to make the action happen.
 
I still couldn't create any issues with lots of disabled controls on tabs. If you want to refresh the screen when a tab is clicked, your code might look like:
Code:
Private Sub TabCtlName_Change()
    Me.Refresh
End Sub

Duane
Hook'D on Access
MS Access MVP
 
would you put this on the on load event of the form or something, or on the on-click of each one of the tabs?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top