23 mod 10 = 3
24 mod 10 = 4
23 mod 3 = 2
12345 mod 133 = 109
You can use the immediate window to test this.
? 12345 mod 133
Duane Hookom, MVP
Date: Thu, 11 Feb 2016 13:17:38 -0600
Subject: RE: [MS_AccessPros] Continuous form formatting
I did this exactly like you explained and it worked perfectly the first time. That never happens for me.
I usually do a bit of research so I know what I am doing. I could not find any information on this function.
Can you explain what it is doing so I can understand.
[FscFscID] Mod 10=1
[FscFscID] Mod 10=2
[FscFscID] Mod 10=3
If FscID is a numeric value you might be able to use conditional formatting.
1 In design view, select all of the controls in the detail section
2 Select Conditional Formatting from the Format ribbon tab
3 Add New Rule
4 Set the Format Only cells where the to "Expression is"
5 Enter an expression of
[FscID] Mod 10=1
6 Set the background color
7 Repeat 3 - 6 changing the 1 to 2 to 3 to 4 to ... 0 with 10 different background colors
There should now be 10 different background colors and the chances are 10% that 4 records displayed together will have the same color. If you want more than 10 colors then create more rules and increase the Mod 10 to Mod 15 or Mod 20 .
Stay warm. It looks like we might hit 0 degrees F tonight!!!
Duane Hookom, MVP
I have continuous for form that shows TEAM participants in a BASKETBALL game. (two teams per game)
The fields in the form are
FscID – which is the ID for the GAMES.
FSCDate – Date of Game
graName – which is the name of the grade for the games
gtePoints – which is the point scored by each team.
If I have 50 games on the form then I will have 100 records. Every two records will have the same FscID, which is the ID for the GAMES. The GAMES and the TEAMS are related in one to many relationship.
I have the Alternate Back Color slightly darker for the form so I can read across it. The colors alternate every other record. This is nice for reading but it makes it hard to tell what two records go together to form one game.
I am wondering if there is a way to format the background so that if the FscID is the same then the backgrounds will be the same. That way two teams in the same game will have to same color.
Is it possible to change the background based in the FscID value?
Thanks for your help.
Posted by: Duane Hookom <firstname.lastname@example.org>
|Reply via web post||•||Reply to sender||•||Reply to group||•||Start a New Topic||•||Messages in this topic (6)|