• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 393
  • Last Modified:

Print records in Column - Array as record datasource

I need to fill out a preprinted deposit slip where the checks are printed in columns, i.e.

001   9999.99             004  6666.66           007 3333.33    
002   8888.88             005  5555.55
003   7777.77             006  4444.44

My data comes from a query containing <CheckNumber> and  <CheckAmount>

I  thought I could create a report, populate an array with the check info then use that array as the
report datasource but  haven't been able  to make that work.

Is there a better way to go about this?  I'm posting this as urgent because I'm at the customers site now and  I really need to solve this fast.


0
cmccurdy
Asked:
cmccurdy
  • 3
  • 2
  • 2
  • +2
1 Solution
 
thenelsonCommented:
In the report, go to File, Page Setup, the columns tab. Set up the columns as you need. Make sure can grow and can Think are off for the section.
0
 
thenelsonCommented:
can Think = can shink
0
 
cquinnCommented:
Use the query as the recordsource of the report, then set up the report to use columns (down then across) - why do you think you should need to use an array?

Go into Page setup, then choose columns and it is fairly self evident how to set it up
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
Leigh PurvisDatabase DeveloperCommented:
<Off Topic>
Hey Nelson - good to see you :-)
Enjoy the break?
(Even I've had a week off lately - from EE anyway... yes some beer was involved :-S)
</Off Topic>
0
 
harfangCommented:
Hello cmccurdy

In addition to the suggestions above...

Make use of  the page header/footer to use up the space where you do not want to print the numbers, and use that for the date, or the like. If you have nothing else to print on the page, you can also use very large margins instead.

The other solution would be to create unbound controls that mimic the layout you need, and fill those through VB, but I hope this won't be necessary.

Good luck!
(°v°)
0
 
cmccurdyAuthor Commented:
Ok, I see  I wasn't specific enough about what I needed.  The preprinted deposit slips are designed for Quickbooks,  in addition to the checks I have the record the cash deposit and total as shown below.  Columns would work if it wasn't for the additional  info.  Also,  only the first 13 checks print on the front but the totals have to include all

Harfang, I'll try using unbound controls, that's sounds like what I was trying to do  with the array datasource, just a little more of a pain.

CASH       9.99
001    9999.99             004  6666.66           007 3333.33    
002    8888.88             005  5555.55                                                      Subtotal      99999.99
003    7777.77             006  4444.44                                                       Less Cash  99999.99

                                                                                                            TOTAL      99999.99              
                                   
0
 
harfangCommented:
Hello cmccurdy

The initial CASH and the TOTAL could be managed easily. The positioning of "Subtotal" and "Less Cash" is troublesome. I don't see how to handle them using a columnar report...

Access forms do not have control arrays, like VB, so you have to simulate them. Use names like txtCN0, txtCN2, ... txtCN12, and txtCA0, ... txtCA12. Used in a loop, you could then

    Set rec = CurrentDb.OpenRecordset("qselYourQueryHere")
    Do Until rec.EOF
        If rec.AbsolutePosition > 12 Then Exit Do
        Me("txtCN" & rec.AbsolutePosition) = rec!CheckNumber
        Me("txtCA" & rec.AbsolutePosition) = rec!CheckAmount
        rec.MoveNext
    Loop

But perhaps you knew that already.
(°v°)
0
 
cmccurdyAuthor Commented:
Unbound controls filled using VBA worked.   A bit cumbersome, but workable give the short  amount of time I have to solve this one today.  Thanks for the help!
0
 
harfangCommented:
Well done! and have a nice week-end now!
(°v°)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now