英文:
Access Tab Control fore color changes when hiding pages
问题
在Access中,我有一个名为tbIMD的TabControl。
背景颜色为#604C78,
前景颜色为#F3F0F6,
悬停颜色为#F3F0F6,
悬停前景颜色为#604C78,
按下颜色为#FDFDFD,
按下前景颜色为#604C78。
当我通过VBA隐藏一个页面时,每当我点击一个页面,所有其他页面的前景颜色都会变成按下前景颜色,这意味着背景颜色和前景颜色现在相同,因此无法阅读文本。
代码如下:
如果DLookup("Purchased", "ItemCategoryT", "ItemCatID = " & Me.ItemCategory) = True Then
Me.pgPurchaseInfo.Visible = True
否则
Me.pgPurchaseInfo.Visible = False
End If
我做错了什么?
英文:
In Access, I have a TabControl called tbIMD.
The Back color is #604C78,
The Fore color is #F3F0F6,
The Hover color is #F3F0F6,
The Hover Fore color is #604C78,
The Pressed color is #FDFDFD,
The Pressed Fore color is #604C78.
The moment I hide a page via VBA, anytime I click on a page, all of the other pages' fore colors changes to the Pressed Fore color, which means that the back color and fore colors are now the same, so you can't read the text.
The code is as follows:
If DLookup("Purchased", "ItemCategoryT", "ItemCatID = " & Me.ItemCategory) = True Then
Me.pgPurchaseInfo.Visible = True
Else
Me.pgPurchaseInfo.Visible = False
End If
What am I doing wrong?
答案1
得分: 0
Ok, so I have been searching and searching and even ChatGPT can't help with an answer...
What I did was create a similar tab control and then just hide the tab control based on the criteria, instead of hiding the pages.
This seems to have solved my problem.
I would however love to know why it does this and whether there is actually a solution...
英文:
Ok, so I have been searching and searching and even ChatGPT can't help with an answer...
What I did was create a similar tab control and then just hide the tab control based on the criteria, instead of hiding the pages.
This seems to have solved my problem.
I would however love to know why it does this and whether there is actually a solution...
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论