Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Grid Layout? 1

Status
Not open for further replies.

Entrepenueress

Technical User
Aug 12, 2002
16
US
I am trying to make a directory of pictures and names and would like to lay out the report in a grid pattern so there would be 3 records across and 5 down. All reports I have done only allowed 1 record per line. Does anyone have any ideas on this? Thanks for your help.
 
Open your report in design view.
The following is from Access help:

On the File menu, click Page Setup.

In the Page Setup dialog box, click the Columns tab.

Under Grid Settings, in the Number Of Columns box, type the number of columns you want on each page.

In the Row Spacing box, type the amount of vertical space you want between each record in the detail section.

Note If you left space between the last control in the detail section and the bottom edge of the detail section, you can leave Row Spacing set to 0.

In the Column Spacing box, type the amount of space you want between the columns.

Under Column Size, type the width you want for a column in the Width box; for example, 3 inches. You can set the height of the detail section by typing a number in the Height box or by adjusting the height of the section in Design view.

Under Column Layout, click the Down, Then Across option or the Across, Then Down option.
 
Thank you! That worked. I didn't realize it was that easy. Do you happen to know if it is possible to make the text in a report sizeable? I am trying to put LastName, FirstName, but I have to make the LastName text box big for the big last names and I would like the FirstName to come right after and not have all that space in between. Can you help me with this?
Thanks!!!!
 
Sure,

Add an unbound text box to your report and set as its control source something like this:
Code:
=[LastName] & ", " & [FirstName]
 
You rock. Thank you. OK, how about one more...can you make text visibility conditional on if a field is null? Example:
Have the text "Apt. #" appear befor the Apt# field ONLY if it is not null? :D Thanks!
 
Yep,

In the On Format event of the report's detail section, put code like this:
Code:
If IsNull([Apt#]) Then
   Me.lblApt.Visible = False
Else
   Me.lblApt.Visible = True
End If
 
OK, under EVENT in the Properties of the report, I don't have an On Format option. I have On Open, On Close, On Activate, On Deactivate, On No Data, On Page and On Error. Would I put the code on one of these?
Thanks again.
 
Click on the bar above the section where the field(s) are you want to suppress. (either the detail section, or a header or footer).....
 
OK, I gotchya now. Although, when I put the code in there, it gives me a compile error and highlights the .lblApt# as not found? Then it highlights the top line in yellow and puts an arrow by it. The top line was automatically written as: Private Sub Report_Page()
 
You should substitute whatever the "Apt. #" heading is called in that statement....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top