• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 413
  • 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
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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