I have an appointment calendar that when opened determines how many time slots to show and creates a grid based on the user choices. In Access 2007 & 2003 it is lightening fast taking less than 1/2 second to load even the most complicated choices. In Access 2010 it takes 15 seconds, OUCH! The code is basically a simple loop as shown(my actual program also pulls data from various locations). Here is an example of the code:
r = 0
For y = 55 To 272 Step MyNumColumns
For x = y To (y + MyNumColumns - 1)
Me("Label" & x).Caption = ""
Me("Label" & x).Left = ((x - y) * MyColumnWidth) + MyTimeColumnWidth
Me("Label" & x).Width = MyColumnWidth
Me("Label" & x).Height = MyRowHeight
Me("Label" & x).Top = r * MyRowHeight
Me("Label" & x).Visible = True
Me("Label" & x).BorderColor = MyColorGrid
Next
r = r + 1
Next y
I have a quick sample db but I can't figure out how to attach it but I can e-mail it if anyone could help me test it out. I hope someone might be able to shed some light on what might be different.
Thank You.
r = 0
For y = 55 To 272 Step MyNumColumns
For x = y To (y + MyNumColumns - 1)
Me("Label" & x).Caption = ""
Me("Label" & x).Left = ((x - y) * MyColumnWidth) + MyTimeColumnWidth
Me("Label" & x).Width = MyColumnWidth
Me("Label" & x).Height = MyRowHeight
Me("Label" & x).Top = r * MyRowHeight
Me("Label" & x).Visible = True
Me("Label" & x).BorderColor = MyColorGrid
Next
r = r + 1
Next y
I have a quick sample db but I can't figure out how to attach it but I can e-mail it if anyone could help me test it out. I hope someone might be able to shed some light on what might be different.
Thank You.