Negative number alignment

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have a report where the numbers in a column will not align. I have
read most of the posts on this forum on this subject and have made
sure controls are the same width, aligned, same format and alignment.

Everything works fine when all the numbers are positive. Negative
numbers in the detail section align a little too far to the left.

Is it possible in a report event, such as the Format event, to test
for the value in the control and then adjust either the Left or
LeftMargin property to push a negative number to the right? I have
tried code like this:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If [txtDueAmt] < 0 Then
Me.txtDueAmt.Properties("Left") = (6.3 * 1440) + 12
Else
Me.txtDueAmt.Properties("Left") = (6.3 * 1440)
End If
End Sub

But this seems to move ALL the txtDueAmt values, regardless of the row
or the actual value, to the same Left position. I need those with
negative values to move to the right and those without negative values
to stay where they are.

How can I do this?

Thanks.

.



Relevant Pages

  • Re: Emailing a Report
    ... "What do you suggest for making sure text on the report is not overlapping, missing, and or out of order? ... I always add icons to my toolbars to make it easier to format forms and reports... ... Align Right -- must have>1 control selected to be enabled ... on the report -- when it generates the reports, if a User_ID has 2 reminders, are they now both showing up on the report? ...
    (microsoft.public.access.modulesdaovba)
  • Re: Formatting Drop Boxes
    ... I built a query that pulls the data for the report, ... fileds I cannot format are the drop boxes. ... How do I format these drop boxes so they appear like the ... black text on a white background and I can align the text ...
    (microsoft.public.access.reports)
  • Re: Emailing a Report
    ... I made the changes to for my report output ... the best format to use to show the report as you see it in Access is --> ... Align Right -- must have>1 control selected to be enabled ... reminders, are they now both showing up on the report? ...
    (microsoft.public.access.modulesdaovba)
  • Re: Format currency field on report.
    ... I have a report where I'd like to have the currency fields formatted so that ... (I know I could change the format of teh data from currency to a plain ... to align the decimal point. ...
    (microsoft.public.access.reports)
  • Re: Need to print Cover Sheet for report.
    ... This caused the last paragraph in the Report ... Is there any way to prevent Access from allocating the page footer space on ... Use code in this group footer's Format event to adjust its height to fill ... Private Sub GroupFooter0_Format ...
    (microsoft.public.access.reports)