Log in

View Full Version : Solved: Buttons Remain Highlited



Movian
03-13-2009, 09:09 AM
Hey,
i am in the middle of an overhaul of our database. I am changing the way our subforms work. Instead of having 5 subforms Each with 11 Tabs on a tab control each tab mabye having 75-100 controls!!!. i have made each tab a subform with its own table. Have placed a tab control on the main form which i dynamicly change the captions on to match the list of tab names previously used for each of the 5 sub forms. Then dynamicly load the form based on the caption of the tab. This will hopefully lead to a more stable system with less corruption and a removal of constant problems with having too many controls and and too many fields in a given table. (I didn't design the system originally and if i had a spare 2 -3 months would change it into 3rd normal form.) but any way i digress. The problem i have now is, the buttons that we use to switch the sub form "Set" now have gained a new quirk where by they remain highlighted when clicked. Instead of highlighting and then returning to normal they remain that slightly nasty shade of light blue until clicked again. If a second button is clicked that also remains highlighted. I am unsure as to the cause of it and would appreciate any help

Here is the on click event for one of the buttons. Please note that the others are similar and also note that the buttons have the same behaviour even if i comment out the application.screen.echo true and false
Application.Echo False
lastaction = Timer
If editing = False Then
If IsUserAuth("VeinWorkup", eventuser) = True Then
If CardiacRiskFactors.Visible = True Then
CardiacRiskFactors.Visible = False
End If
If Contactinformation.Visible = False Then
Contactinformation.Visible = True
Insuranceinfo.Visible = True
PrimaryInsurance.Visible = True
SecondaryInsurance.Visible = True
End If

fsubModule.SourceObject = "Subj Complaints/Habits"
SetTabs "Vein1"
Tablist = "Vein1"
Me.Tab0.SetFocus
CurrentModule = "VeinSpecialist"
Else
If IsUserAuth("VeinTreatment", eventuser) = True Then
If CardiacRiskFactors.Visible = True Then
CardiacRiskFactors.Visible = False
End If
If Contactinformation.Visible = False Then
Contactinformation.Visible = True
Insuranceinfo.Visible = True
PrimaryInsurance.Visible = True
SecondaryInsurance.Visible = True
End If
fsubModule.SourceObject = "Treatment Plan"
CurrentModule = "VeinSpecialist"
Else
MsgBox "You do not have permision to access this module", vbCritical, "Access Denied"
End If
End If
Else
MsgBox "You can only add fields from the current module while editing reports"
End If
Application.Echo True
Me.Refresh

Movian
03-16-2009, 07:36 AM
OK finally figured out what happened. The person who originally designed the system decided to use a group of toggle buttons. Instead of using normal buttons. I deleted what i thought was a standard box being used for aesthetics but now i think was a group control. After replacing the toggle buttons with normal buttons the problem has resolved. Thanks