Formatting Report Data (1 Viewer)

DALeffler

Registered Perpetrator
Local time
Today, 05:41
Joined
Dec 5, 2000
Messages
263
Is there a way to format data on a report based on the value of the data?

I have an Excel spreadsheet that lists columns of numbers like this:

1 0.122 0.006 2.267 2.252 76.5
2 0.116 0.008 2.267 2.249 76.5
3 0.118 0.008 2.260 2.260 76.5
4 0.124 0.115 2.248 2.245 76.5
5 0.199 0.004 2.250 2.252 76.4
6 0.117 0.007 2.100 2.190 76.3
~~~~~~~~~~~~~~~~~~~~~~~
200 0.116 0.005 2.250 2.250 77.0

And how I need the data to display on hard copy looks like this:

1 0.122 0.006 2.267 2.252 76.5
2 0.116 0.008 2.267 2.249 76.5
3 0.118 0.008 2.260 2.260 76.5
4 0.124 0.115 2.248 2.245 76.5
5 0.199 0.004 2.250 2.252 76.4
6 0.117 0.007 2.100 2.190 76.3
~~~~~~~~~~~~~~~~~~~~~~~
200 0.116 0.005 2.250 2.250 77.0

with the added feature (and I didn't show it here) where any row with a column value that's out of range (the bold/italicized formats) is underlined.

I now do this in Excel formatting the data to the hard copy with Excel VBA and while it's not really straight forward, it is do-able.

The formatting makes the spreadsheet very readable to a tech trying to figure out the reason why s/he's out on a service call as well as limiting the sheet to 1 hardcopy page.

Can I do this type of report formatting in Access reports and how would I go about doing it?

Can I get to that Excel spread sheets' formatting from Access?

I'd really like to do this all from Access.

I'm hoping I can import from Excel to Access all the data in the columns and rows, hopefully getting rid of all the Excel VBA shtuff, printing an Access report that looks exactly like the spreadsheet from Excel I'm now printing, and opening the door to the zillions of other things possible with Access. But only if I can get that hard copy to look like it does when pulled from Excel.

Any ideas you all got would be most appreciated!

Thanks very much,

Doug

[This message has been edited 'bout 60 times by DALeffler (edited 01-04-2001).] :)

[This message has been edited by DALeffler (edited 01-04-2001).]
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:41
Joined
Feb 19, 2002
Messages
43,302
This is an example of code from one of my reports:

If Me.YDifAmtAll > 0 Then
Me.txtFullName.FontBold = True
Else
Me.txtFullName.FontBold = False
End If

Some other properties are:
FontItalic
FontName
FontSize
FontUnderline
FontWeight
ForeColor
BackColor
BorderStyle
BorderWidth
...
See the pattern?
You can use the object browser to find them all if you look under Library:Access, Class:TextBox (or ComboBox,etc). Then look the property up in help if you need help in using it.
 

Users who are viewing this thread

Top Bottom