dictionary

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I have Report page that have two columns and head charackter (as telephone
report)

Now I am looking for the dictinary design that show the last word per page
from Detail to top of page.
I use Array, but the problem is when I change the post Field properties on
Detail "CAN GROW" YES, then the word on top of the page be not correct only
few pages is correct.
When I change the field on detail NOT "CAN GROW" then the word view
correct. But I need the field can grow. How can man fix this?

And even I want right side of page show index as:
A
B
C
D
E
F
G......etc
And when it comes ex. word on Detail that the first charackter is K then the
index K chrackter have diffrent color.

Do you have any comment about my question or do you have sample as my
question ?

Jesus Bless
 
I can get the index on the right side of the page. Maybe someone else can
assist with the other part of your question.

Make sure you have a page header section with a text box named "txtIndex".
The text box must be bound to your sorting field.

Then add code like the following to your report. You may want to adjust the
intIndexWidth (box size) and the fontsize. The code doesn't account for more
than A-Z.

Option Compare Database
Dim strIndex As String

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
strIndex = Left(Me.txtIndex, 1)
End Sub

Private Sub Report_Page()
Dim intPageHeight As Integer
Dim intIndexWidth As Integer
Dim intLeft As Integer
Dim intLetter As Integer
Dim lngColor As Long
intIndexWidth = 500
intLeft = Me.Width - intIndexWidth
Me.FontSize = 24
Me.FontBold = True
Me.FontName = "Arial"
For intLetter = 1 To 26
If strIndex = Chr(64 + intLetter) Then
lngColor = vbYellow
Else
lngColor = vbWhite
End If

Me.Line (intLeft, intLetter * intIndexWidth)- _
Step(intIndexWidth, intIndexWidth), lngColor, BF
Me.CurrentX = intLeft + 50
Me.CurrentY = intLetter * intIndexWidth
Me.ForeColor = vbBlack
Me.Print Chr(64 + intLetter)
Next
End Sub
 
Hello Duane
Thank you for your replay. I have some note to tell you if it is possible to
fix the code.

I test it and it is good only the place that you already mentioned about
index to be on right side.

Well, I need to add more character to index that is:
Chr(228)
Chr(223)
Chr(246)

Can man make Red border around character index as my picture sample above?
Is it possible to make the index properties of character to be Center
instead left ?

By the way, when list views more than character on the same page ex. M, N
and O so in the index it be yellow only O.
Is it possible to make them M, N & O be yellow if they views in same page ?
I put the strIndex in the GroupHeader as you see on above picture.

Jesus Bless
 
You can add the 3 extra characters after the first loop. Check Help on
ForeColor or something similar for coloring the box. I can't imagine how to
either center the text or highlight more than one letter.
 
I don't really have a clue how to shade all the letters contained on the
page. If the detail section never grew or shrunk it might be fairly easy.
 
Back
Top