469,282 Members | 2,025 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

How to flow a memo field to another page in a report?

sueb
379 256MB
I have a report that comprises 3 memo fields, a text field, and a date field. What I want the report to do is to print the 3 memo fields (which are arranged as side-by-side columns), flowing them as necessary from page to page, and, in the page footer, print the text and the date fields.

I have the text/date fields in the page footer, but they print only on the last page of the report, not on each page. Also (and actually a bigger problem), even though I have CanGrow and CanShrink set to Yes, and the memo fields are sized to the height of about 3 text lines, the memo fields seem to insist on printing their entire length. I assume this is why my page footer isn't printing at the bottom of each page. Or, rather, that it is printing at the bottom of the page, but the page is 3-4 pages long.

I had assumed that the memo fields would behave sort of like table cells in Word; i.e., that they would be able to "break" (in Word's parlance) across pages, but no?
Apr 6 '11 #1

✓ answered by TheSmileyCoder

Maybe I'm completely misunderstanding something. Ive made a small DB example with what I THINK is the thing your asking for. Take a look and correct me if im way off.

11 3809
Stewart Ross
2,545 Expert Mod 2GB
Hi Sueb. Access memo fields do not behave like Word fields, and as far as I know cannot be set to flow from one page to another.

You could use Word itself to do what you require, under programmed control from Access. Word would be an automation server for Access, started under VBA control.

The learning curve to use Word to write to a pre-defined report template that you set up and store in advance is unfortunately fairly steep. You may need to look up examples on MSDN or, perhaps easier, follow examples in books on Access automation using VBA (such as the VBA Developers Handbook by Getz and Glibert).

A very basic introduction to this topic is linked here from MSDN. It gives a flavour of what is involved. http://support.microsoft.com/kb/184974

A more complex example from MSDN on how to write to Word tables illustrates the complexity involved. http://msdn.microsoft.com/en-us/libr...ffice.11).aspx

-Stewart
Apr 6 '11 #2
sueb
379 256MB
Thanks for this advice and these links, Stewart Ross!

You're right, this is a bit daunting. Reading through these articles, however, gave me an idea, and I'd like your take on it: what if I export the 5 data fields (a single record is all I would ever be working with at a time) to Excel, and use Word's Merge capabilities to format the report? Do you think a memo field will export properly?
Apr 7 '11 #3
Stewart Ross
2,545 Expert Mod 2GB
Exporting to Excel should work fine, as long as you export from Access for the latest versions of Excel - earlier version limited the number of characters in a cell to 255, which would be useless for what you want to do.

It would also be possible to mail merge Word directly with Access as its data source - this is an option you have from Word's mailmerge. I think the data may need to be in an Access table for this to work if I remember correctly - I don't think it will connect to an Access query for mailmerge purposes.

-Stewart
Apr 7 '11 #4
TheSmileyCoder
2,321 Expert Mod 2GB
From the way you describe your issue, its sound to me like you have placed your date and text fields in the REPORT footer instead of the PAGE footer.

Please check this to ensure that is not the issue.

Im a bit unsure what you mean by "The memo fields insist to print their entire length". I would presume that was desired behavior?
Apr 7 '11 #5
sueb
379 256MB
Sorry for the confusion. Only the text (len=25) and date controls are in the page footer; the three memo controls are in the detail section.

And, yes, I do want the memo fields to print their entire length, just not all on the same "page". What I wanted was for the report to print a certain physical length (about 8 inches) of each memo control on each page, and to print the text control and the date control at the bottom of each page.

Since the data is in a table, just as I want it, I will experiment with Merging directly from Access into Word--what a great tip!
Apr 7 '11 #6
TheSmileyCoder
2,321 Expert Mod 2GB
Maybe I'm completely misunderstanding something. Ive made a small DB example with what I THINK is the thing your asking for. Take a look and correct me if im way off.
Attached Files
File Type: zip Flow.zip (20.2 KB, 171 views)
Apr 7 '11 #7
Stewart Ross
2,545 Expert Mod 2GB
Well, I live and learn. Up till now I did not think Access's Can Grow property for textboxes would extend across pages, but it does.

Way to go, Smileycoder.

-Stewart
Apr 7 '11 #8
sueb
379 256MB
@SmileyCoder, this is exactly what I tried doing with my report that did not work! This is wonderful--now all I have to do is figure out what setting is incorrect in my report that allows yours to work right--thanks!
Apr 11 '11 #9
TheSmileyCoder
2,321 Expert Mod 2GB
Remember that both the control as well as its section (usually the detail) must have its CanGrow set to true.
Apr 11 '11 #10
sueb
379 256MB
Well, that did it, SmileyCoder! I thought I had previously set everything like this, but obviously not, because now it looks just as I want it to, and it certainly did not before.
Apr 11 '11 #11
TheSmileyCoder
2,321 Expert Mod 2GB
Thats very nice to hear! The multitude of settings while allowing great variaty and possibilities can also at times give great headaches. :)
Apr 12 '11 #12

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by midlothian | last post: by
4 posts views Thread by kaplan.gillian | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.