L
Laura C.
Hi there,
I've been looking for threads about shrinking text to fit a control (rather
than allowing control to grow). I looked on Lebans' site but could not figure
out how to import his fTextWidth module to my own database. (Also could not
understand his instructions well enough to use them in a report rather than a
form, which is what his solutions were designed for.)
The solution I arrived at is not the most elegant one, but given that it's a
small number of records that are not fitting in the control, it seemed like
the most expedient. When I tried shrinking text strings that were above a
certain number of characters, some records were shrunk unnecessarily.
Okay, so here's what I wrote for the Format Event in the Detail section, and
it works fine, except that when I try to close and save the report, I get an
error message:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Shareholder Like "Quattrociocchi*" Or Me.Shareholder Like "Moore
August*" Or Me.Shareholder Like "MacDonald August*" Then
Me.Shareholder.FontSize = 7
Else
Me.Shareholder.FontSize = 8
End If
End Sub
The error message is:
"The changes you requested to the table were not successful because they
would create duplicate values in the index, primary key, or relationship.
(Error 3022)"
I have no idea what this means. I can't figure out where there would be
duplicate values, although the underlying query for this report does rest
upon a field called "Full Name" and another called "FullName," which is
renamed "Shareholder" for the purposes of this report.
Can you help me to debug?
Thank you in advance!
I've been looking for threads about shrinking text to fit a control (rather
than allowing control to grow). I looked on Lebans' site but could not figure
out how to import his fTextWidth module to my own database. (Also could not
understand his instructions well enough to use them in a report rather than a
form, which is what his solutions were designed for.)
The solution I arrived at is not the most elegant one, but given that it's a
small number of records that are not fitting in the control, it seemed like
the most expedient. When I tried shrinking text strings that were above a
certain number of characters, some records were shrunk unnecessarily.
Okay, so here's what I wrote for the Format Event in the Detail section, and
it works fine, except that when I try to close and save the report, I get an
error message:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Shareholder Like "Quattrociocchi*" Or Me.Shareholder Like "Moore
August*" Or Me.Shareholder Like "MacDonald August*" Then
Me.Shareholder.FontSize = 7
Else
Me.Shareholder.FontSize = 8
End If
End Sub
The error message is:
"The changes you requested to the table were not successful because they
would create duplicate values in the index, primary key, or relationship.
(Error 3022)"
I have no idea what this means. I can't figure out where there would be
duplicate values, although the underlying query for this report does rest
upon a field called "Full Name" and another called "FullName," which is
renamed "Shareholder" for the purposes of this report.
Can you help me to debug?
Thank you in advance!