Petrosunis
Registered User.
- Local time
- Today, 17:03
- Joined
- Mar 8, 2019
- Messages
- 11
The DB was made with MS Access 2010 and contains our local Pool League information.
This is the form code for Week 21 of 30, Round 1 of 5 "Result" list box's I use to input game results. *How you won, or if you lost the game.*
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
The default option is "Choose" which has black back color and white fore color. No change to that.
When "Win" is chosen and clicked on: the back color change to light green(#A7DA4E) and the fore color change to dark green(#22B14C).
When "Loss" is chosen and clicked on: the back color change to (Red Accent2,Lighter60%) and the fore color to change to Red(#ED1C24).
When "Bye" is chosen and clicked on the back color change to (#00B7EF) and the Fore color change to (2F3699).
When "8oB" is chosen and clicked on the back color change to (#FFF200) and the fore color change to (7A4E2B).
When "BaR" is chosen and clicked on the back color change to (PurpleAccent4,Lighter60%) and the fore color to change to (#6F3198).
There is a "Module" in the DB that controls an image that represents the players current rank based on # of wins, and if they are tied with anyone else. But it doesn't do much else. *not sure if a few lines of code in the module code would cover each option OR if each box on the form(s) would have to have code added seperately. I'm a NOOB and have no idea how to make this happen..lol
I have almost no experience with code.
Either way if a solution can be found, I will try to help make it happen on my forms.
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
This is the form code for Week 21 of 30, Round 1 of 5 "Result" list box's I use to input game results. *How you won, or if you lost the game.*
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
The default option is "Choose" which has black back color and white fore color. No change to that.
When "Win" is chosen and clicked on: the back color change to light green(#A7DA4E) and the fore color change to dark green(#22B14C).
When "Loss" is chosen and clicked on: the back color change to (Red Accent2,Lighter60%) and the fore color to change to Red(#ED1C24).
When "Bye" is chosen and clicked on the back color change to (#00B7EF) and the Fore color change to (2F3699).
When "8oB" is chosen and clicked on the back color change to (#FFF200) and the fore color change to (7A4E2B).
When "BaR" is chosen and clicked on the back color change to (PurpleAccent4,Lighter60%) and the fore color to change to (#6F3198).
There is a "Module" in the DB that controls an image that represents the players current rank based on # of wins, and if they are tied with anyone else. But it doesn't do much else. *not sure if a few lines of code in the module code would cover each option OR if each box on the form(s) would have to have code added seperately. I'm a NOOB and have no idea how to make this happen..lol
I have almost no experience with code.
Either way if a solution can be found, I will try to help make it happen on my forms.
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
Code:
Private Sub W21R1Result_AfterUpdate()
Select Case Me.W21R1Result
Case "Choose":
Me.W21R1Win.Value = 0
Me.W21R1Loss.Value = 0
Me.W21R1Bye.Value = 0
Me.W21R18oB.Value = 0
Me.W21R1BaR.Value = 0
Case "Win":
Me.W21R1Win.Value = 1
Me.W21R1Loss.Value = 0
Me.W21R1Bye.Value = 0
Me.W21R18oB.Value = 0
Me.W21R1BaR.Value = 0
Case "Loss":
Me.W21R1Win.Value = 0
Me.W21R1Loss.Value = 1
Me.W21R1Bye.Value = 0
Me.W21R18oB.Value = 0
Me.W21R1BaR.Value = 0
Case "Bye":
Me.W21R1Win.Value = 1
Me.W21R1Loss.Value = 0
Me.W21R1Bye.Value = 1
Me.W21R18oB.Value = 0
Me.W21R1BaR.Value = 0
Case "8oB":
Me.W21R1Win.Value = 1
Me.W21R1Loss.Value = 0
Me.W21R1Bye.Value = 0
Me.W21R18oB.Value = 1
Me.W21R1BaR.Value = 0
Case "BaR":
Me.W21R1Win.Value = 1
Me.W21R1Loss.Value = 0
Me.W21R1Bye.Value = 0
Me.W21R18oB.Value = 0
Me.W21R1BaR.Value = 1
Case Else
Err.Raise 600, , "Unhandled result"
End Select
End Sub