2 Easy Questions?

D

Dave

This should be simple but I can't find it in Help.
I am using Access '03.

1. How can I remove the Grid/Border lines of the Field's information when I
print.
(I.E. I would like it to say,
Name and then the Name of the person...without a box around it.)

2.I have a report and I want it to print two records per page. Can I do
this??? I have set the report in design view for there only to be room for
two.
 
G

Golfinray

Right click, go to properties, set border style to transparent. Go to
file/page setup, set the number of columns and rows.
 
K

Ken Sheridan

1.1 For printing always use a report rather than printing a form or
datasheet. The latter should only be done for occasional ad hoc printing
when designing or debugging an application, not as part of an application's
functionality. In a report just set the bound control's BorderStyle property
to Transparent.

2.1 Add a page break control to the bottom of the detail section and set
its visible property to True in the section's Format event procedure after
each second record by using the Mod operator in an expression lie so:

2.2 In the report's detail section add a text box, txtCount; set its
Visible property to False, its ControlSource property to =1 and its
RunningSum property to 'Over All'.

2.3. In the detail section's Format event procedure set the page break
control's Visible property, e.g.

Me.YourPageBreakControl.Visible = (Me.txtCount Mod 2 = 0)

2.4 The above will work even if the details are of variable length and
allowed to grow/shrink providing a second record on a page doesn't spill over
onto the next page. The alternative would be to keep the detail section a
fixed depth by not allowing it or its controls to grow or shrink, but you
might hide some data doing this if the contents of a control won't fit into
it at its design size.

Ken Sheridan
Stafford, England
 
D

Dave

Ken,
Thanks for the help.

I tried the procedures you suggested and it didn't work, so I prolly did
something wrong.

Where do I put the page break in propspective to the txtcount???

Also, I am unsure about the text entry... Do I enter-
Me.YourPageBreakControl.Visible or = (Me.txtCount Mod 2 = 0)

Also, what should I put in the Text box if I want it to go by Name? I am
somewhat confused by the Step 2.3...mainly the Me. in Me.txtcount Mod 2 =0.

Thanks,
Dave
 
L

Larry Linson

Dave said:
Where do I put the page break in propspective to the txtcount???

You put following the last control in the Detail Section.
Also, I am unsure about the text entry... Do I enter-
Me.YourPageBreakControl.Visible or = (Me.txtCount Mod 2 = 0)

What "text entry"? In the Format event for the Detail Section, you put VBA
code exactly as Ken described it:

Me.YourPageBreakControl.Visible refers to the Visible Property of the
Control you added,
to which Ken refers as "YourPageBreakControl" but you use the Control
Name you
assign it, or whatever it is assigned in your database
Me.txtCount is the Control (which itself has a Visible property of "No")
divided modulo 2
will yield a 0 if it is an even number, that is every second record...
and
Me.txtCount Mod 2 = 0 is a logical value of True if it is an even
number or a
logical value of False if it is odd... Ken used an efficient method of
writing it, obvious
to someone well-versed in programming, but it might have been clearer
to you had he
written:

If (Me.txtCount Mod 2 = 0) Then
Me.YourPageBreakControl.Visible = True
Else
Me.YourPageBreakControl.Visible = False
End If

and then you could have gone to VBA Help on a module window and
researched Mod
(modulus division) and the If statement (if it was not obvious). Ken
told you exactly
what to type in -- all of it. There was nothing to indicate either/or;
you just didn't
recognize the logical value as such.

Larry Linson
Microsoft Office Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top